Skip to content

Commit

Permalink
chore: use captured identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Apr 17, 2022
1 parent 372a5f3 commit bc64872
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions narwhal/consensus/src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ impl<PublicKey: VerifyingKey> SubscriberServer<PublicKey> {
let (socket, peer) = match listener.accept().await {
Ok(value) => value,
Err(e) => {
debug!("Failed to establish connection with subscriber {}", e);
debug!("Failed to establish connection with subscriber {e}");
continue;
}
};

// TODO [issue #109]: Limit the number of subscribers here rather than in the core.
debug!("Incoming connection established with {}", peer);
debug!("Incoming connection established with {peer}");
let core_channel = self.tx_subscriber.clone();
let consensus_store = self.consensus_store.clone();
let certificate_store = self.certificate_store.clone();
Expand Down Expand Up @@ -288,15 +288,15 @@ impl<PublicKey: VerifyingKey> SubscriberConnection<PublicKey> {
Some(buffer) = self.socket.next() => match buffer {
Ok(bytes) => match bincode::deserialize(&bytes) {
Ok(request) => if let Err(e) = self.synchronize(request).await {
error!("{}", e);
error!("{e}");
},
Err(e) => {
debug!("subscriber {} sent malformed sync request: {}", self.peer, e);
break;
}
},
Err(e) => {
debug!("Error while reading TCP stream: {}", e);
debug!("Error while reading TCP stream: {e}");
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion narwhal/consensus/src/tusk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl<PublicKey: VerifyingKey> Consensus<PublicKey> {
.expect("Failed to send certificate to primary");

if let Err(e) = self.tx_output.send(output).await {
warn!("Failed to output certificate: {}", e);
warn!("Failed to output certificate: {e}");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion narwhal/node/src/generate_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn main() {
match options.action {
Action::Print => {
let content = serde_yaml::to_string(&registry).unwrap();
println!("{}", content);
println!("{content}");
}
Action::Record => {
let content = serde_yaml::to_string(&registry).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion narwhal/primary/src/block_waiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ impl<PublicKey: VerifyingKey> BlockWaiter<PublicKey> {
let r = match timeout(BATCH_RETRIEVE_TIMEOUT, batch_receiver).await {
Ok(Ok(result)) => result.or(Err(BlockErrorType::BatchError)),
Ok(Err(err)) => {
println!("Receiver error: {}", err);
println!("Receiver error: {err}");
Err(BlockErrorType::BatchError)
}
Err(_) => Err(BlockErrorType::BatchTimeout),
Expand Down

0 comments on commit bc64872

Please sign in to comment.