Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Aug 24, 2023
1 parent 4b4101c commit 960a9f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions gossip/src/contact_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,7 @@ fn sanitize_entries(addrs: &[IpAddr], sockets: &[SocketEntry]) -> Result<(), Err
// Verify that port offsets don't overflow.
if sockets
.iter()
.fold(Some(0u16), |offset, entry| {
offset?.checked_add(entry.offset)
})
.try_fold(0u16, |offset, entry| offset.checked_add(entry.offset))
.is_none()
{
return Err(Error::PortOffsetsOverflow);
Expand Down
4 changes: 2 additions & 2 deletions ledger-tool/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl ProgramSubCommand for App<'_, '_> {
.arg(
Arg::with_name("input")
.help(
r##"Input for the program to run on, where FILE is a name of a JSON file
r#"Input for the program to run on, where FILE is a name of a JSON file
with input data, or BYTES is the number of 0-valued bytes to allocate for program parameters"
The input data for a program execution have to be in JSON format
Expand All @@ -196,7 +196,7 @@ and the following fields are required
],
"instruction_data": [31, 32, 23, 24]
}
"##,
"#,
)
.short("i")
.long("input")
Expand Down
2 changes: 1 addition & 1 deletion merkle-tree/src/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl<'a> Proof<'a> {
None
}
});
matches!(result, Some(_))
result.is_some()
}
}

Expand Down

0 comments on commit 960a9f0

Please sign in to comment.