Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
f-gate committed Sep 4, 2023
1 parent 390ab10 commit c61cf39
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tools/polkatool/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use clap::Parser;
use std::{
path::PathBuf,
io::Write,
};
use std::{io::Write, path::PathBuf};

#[derive(Parser, Debug)]
#[clap(version)]
Expand Down Expand Up @@ -79,13 +76,11 @@ fn main() {
Err(error) => {
eprintln!("ERROR: failed to create output file {:?}: {}", out, error);
std::process::exit(1);
},
}
};
Box::new(std::io::BufWriter::new(fp))
},
None => {
Box::new(std::io::BufWriter::new(std_out))
}
None => Box::new(std::io::BufWriter::new(std_out)),
};

for (nth_instruction, maybe_instruction) in blob.instructions().enumerate() {
Expand All @@ -100,10 +95,7 @@ fn main() {
}
};
if let Err(error) = writeln!(&mut bw, "{}", instruction) {
eprintln!(
"ERROR: failed to write instruction from buffer. {:?} {}.",
error, instruction
);
eprintln!("ERROR: failed to write instruction from buffer. {:?} {}.", error, instruction);
std::process::exit(1);
}
}
Expand Down

0 comments on commit c61cf39

Please sign in to comment.