Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Fix nightly clippy warnings (#8199) (#8212)
Browse files Browse the repository at this point in the history
automerge
  • Loading branch information
mergify[bot] authored Feb 11, 2020
1 parent 2951ee5 commit cab6917
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions core/src/local_vote_signer_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ pub struct LocalVoteSignerService {
impl LocalVoteSignerService {
#[allow(clippy::new_ret_no_self)]
pub fn new(port_range: PortRange) -> (Self, SocketAddr) {
let addr = match solana_net_utils::find_available_port_in_range(port_range) {
Ok(port) => SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), port),
Err(_e) => panic!("Failed to find an available port for local vote signer service"),
};
let addr = solana_net_utils::find_available_port_in_range(port_range)
.map(|port| SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), port))
.expect("Failed to find an available port for local vote signer service");
let exit = Arc::new(AtomicBool::new(false));
let thread_exit = exit.clone();
let thread = Builder::new()
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/sigverify_shreds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ fn slot_key_data_for_gpu<
let keyvec_size = keys_to_slots.len() * size_of::<T>();
keyvec.resize(keyvec_size, 0);

for (i, (k, slots)) in keys_to_slots.iter_mut().enumerate() {
for (i, (k, slots)) in keys_to_slots.iter().enumerate() {
let start = i * size_of::<T>();
let end = start + size_of::<T>();
keyvec[start..end].copy_from_slice(k.as_ref());
Expand Down

0 comments on commit cab6917

Please sign in to comment.