mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-22 09:23:16 +00:00
inconsistencies in cargo fmt
running `cargo +nightly fmt -p app-loader` gives you one result. running `cargo +nightly fmt --check` gives you another result. manually opening and saving the files causes a result to agree with the check.
This commit is contained in:
parent
00bb37186a
commit
710da30952
2 changed files with 4 additions and 12 deletions
|
|
@ -22,10 +22,7 @@ fn main() {
|
|||
}
|
||||
|
||||
// Put the linker script somewhere the linker can find it
|
||||
fs::File::create(out_dir.join("link.x"))
|
||||
.unwrap()
|
||||
.write_all(include_bytes!("link.x"))
|
||||
.unwrap();
|
||||
fs::File::create(out_dir.join("link.x")).unwrap().write_all(include_bytes!("link.x")).unwrap();
|
||||
println!("cargo:rustc-link-search={}", out_dir.display());
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
|
|
|
|||
|
|
@ -132,12 +132,7 @@ fn read_elf(memory: Option<&mut xous::MemoryMessage>) -> usize {
|
|||
let file_size = to_usize(start + 0x10, 4);
|
||||
let mem_size = to_usize(start + 0x14, 4);
|
||||
let mem_size = mem_size + padding;
|
||||
let mem_size = mem_size
|
||||
+ if mem_size & 0xFFF == 0 {
|
||||
0
|
||||
} else {
|
||||
0x1000 - (mem_size & 0xFFF)
|
||||
};
|
||||
let mem_size = mem_size + if mem_size & 0xFFF == 0 { 0 } else { 0x1000 - (mem_size & 0xFFF) };
|
||||
|
||||
assert_eq!(0, mem_size & 0xFFF);
|
||||
assert_eq!(0, (vaddr - padding) & 0xFFF);
|
||||
|
|
|
|||
Loading…
Reference in a new issue