Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup(clippy): Resolve new nightly clippy and rustc lints #7860

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions zebra-chain/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ impl Block {
/// Verified blocks have a valid height.
pub fn coinbase_height(&self) -> Option<Height> {
self.transactions
.get(0)
.and_then(|tx| tx.inputs().get(0))
.first()
.and_then(|tx| tx.inputs().first())
.and_then(|input| match input {
transparent::Input::Coinbase { ref height, .. } => Some(*height),
_ => None,
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ impl Transaction {
pub fn is_coinbase(&self) -> bool {
self.inputs().len() == 1
&& matches!(
self.inputs().get(0),
self.inputs().first(),
Some(transparent::Input::Coinbase { .. })
)
}
Expand Down
2 changes: 2 additions & 0 deletions zebra-network/src/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mod minimum_peer_version;
mod priority;

#[cfg(any(test, feature = "proptest-impl"))]
#[allow(unused_imports)]
pub use client::tests::ClientTestHarness;

#[cfg(test)]
Expand All @@ -28,6 +29,7 @@ pub use error::{ErrorSlot, HandshakeError, PeerError, SharedPeerError};
pub use handshake::{ConnectedAddr, ConnectionInfo, Handshake, HandshakeRequest};
pub use load_tracked_client::LoadTrackedClient;
pub use minimum_peer_version::MinimumPeerVersion;
#[allow(unused_imports)]
pub use priority::{
address_is_valid_for_inbound_listeners, address_is_valid_for_outbound_connections,
AttributePreference, PeerPreference,
Expand Down
Loading