mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-27 05:59:54 +00:00
style: apply cargo fmt to build.rs and location_conversion.rs
This commit is contained in:
1 parent
3119c7edee
commit
4ab1dee12f
2 files changed
+3
-8
No files matched your search
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user