Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
style/(src): make clippy suggested changes
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Livesey <[email protected]>
  • Loading branch information
suchapalaver committed Jul 7, 2022
1 parent 36f441b commit 8fd9cb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl DevmodeService {

#[allow(clippy::ptr_arg)]
fn get_block(&mut self, block_id: &BlockId) -> Block {
debug!("Getting block {}", to_hex(&block_id));
debug!("Getting block {}", to_hex(block_id));
self.service
.get_blocks(vec![block_id.clone()])
.expect("Failed to get block")
Expand Down Expand Up @@ -164,7 +164,7 @@ impl DevmodeService {
#[allow(clippy::ptr_arg)]
fn send_block_ack(&mut self, sender_id: &PeerId, block_id: BlockId) {
self.service
.send_to(&sender_id, "ack", block_id)
.send_to(sender_id, "ack", block_id)
.expect("Failed to send block ack");
}

Expand Down
13 changes: 6 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,12 @@ fn main() {

let no_forks: bool = matches.is_present("no_forks");

let console_log_level;
match matches.occurrences_of("verbose") {
0 => console_log_level = LogLevelFilter::Warn,
1 => console_log_level = LogLevelFilter::Info,
2 => console_log_level = LogLevelFilter::Debug,
_ => console_log_level = LogLevelFilter::Trace,
}
let console_log_level = match matches.occurrences_of("verbose") {
0 => LogLevelFilter::Warn,
1 => LogLevelFilter::Info,
2 => LogLevelFilter::Debug,
_ => LogLevelFilter::Trace,
};

let stdout = ConsoleAppender::builder()
.encoder(Box::new(PatternEncoder::new(
Expand Down

0 comments on commit 8fd9cb1

Please sign in to comment.