style: apply cargo fmt to build.rs and location_conversion.rs

This commit is contained in:
Kurdistan Tech Ministry committed 2026-04-30 03:55:29 +03:00
1 parent 3119c7edee
commit 4ab1dee12f
2 files changed
+3 -8

No files matched your search

+2 -5
View File
@@ -223,11 +223,8 @@ fn post_process(input_path: &Path, output_path: &Path) -> Result<()> {
config.set_strip(strip);
config.set_optimize(optimize);
let orig = fs::read(input_path).with_context(|| format!("Failed to read {input_path:?}"))?;
let linked = polkavm_linker::program_from_elf(
config,
orig.as_ref(),
)
.map_err(|err| anyhow::format_err!("Failed to link polkavm program: {}", err))?;
let linked = polkavm_linker::program_from_elf(config, orig.as_ref())
.map_err(|err| anyhow::format_err!("Failed to link polkavm program: {}", err))?;
fs::write(output_path, linked).with_context(|| format!("Failed to write {output_path:?}"))?;
Ok(())
}
@@ -58,9 +58,7 @@ pub struct DescribePalletTerminal;
impl DescribeLocation for DescribePalletTerminal {
fn describe_location(l: &Location) -> Option<Vec<u8>> {
match l.unpack() {
(0, [PalletInstance(i)]) => {
Some((b"Pallet", Compact::<u32>::from(*i as u32)).encode())
},
(0, [PalletInstance(i)]) => Some((b"Pallet", Compact::<u32>::from(*i as u32)).encode()),
_ => return None,
}
}