Fix new nightly clippy and rustc lints (#7860)
This commit is contained in:
parent
e4c3f95d27
commit
7e7f989545
|
@ -78,8 +78,8 @@ impl Block {
|
||||||
/// Verified blocks have a valid height.
|
/// Verified blocks have a valid height.
|
||||||
pub fn coinbase_height(&self) -> Option<Height> {
|
pub fn coinbase_height(&self) -> Option<Height> {
|
||||||
self.transactions
|
self.transactions
|
||||||
.get(0)
|
.first()
|
||||||
.and_then(|tx| tx.inputs().get(0))
|
.and_then(|tx| tx.inputs().first())
|
||||||
.and_then(|input| match input {
|
.and_then(|input| match input {
|
||||||
transparent::Input::Coinbase { ref height, .. } => Some(*height),
|
transparent::Input::Coinbase { ref height, .. } => Some(*height),
|
||||||
_ => None,
|
_ => None,
|
||||||
|
|
|
@ -511,7 +511,7 @@ impl Transaction {
|
||||||
pub fn is_coinbase(&self) -> bool {
|
pub fn is_coinbase(&self) -> bool {
|
||||||
self.inputs().len() == 1
|
self.inputs().len() == 1
|
||||||
&& matches!(
|
&& matches!(
|
||||||
self.inputs().get(0),
|
self.inputs().first(),
|
||||||
Some(transparent::Input::Coinbase { .. })
|
Some(transparent::Input::Coinbase { .. })
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ mod minimum_peer_version;
|
||||||
mod priority;
|
mod priority;
|
||||||
|
|
||||||
#[cfg(any(test, feature = "proptest-impl"))]
|
#[cfg(any(test, feature = "proptest-impl"))]
|
||||||
|
#[allow(unused_imports)]
|
||||||
pub use client::tests::ClientTestHarness;
|
pub use client::tests::ClientTestHarness;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -28,6 +29,7 @@ pub use error::{ErrorSlot, HandshakeError, PeerError, SharedPeerError};
|
||||||
pub use handshake::{ConnectedAddr, ConnectionInfo, Handshake, HandshakeRequest};
|
pub use handshake::{ConnectedAddr, ConnectionInfo, Handshake, HandshakeRequest};
|
||||||
pub use load_tracked_client::LoadTrackedClient;
|
pub use load_tracked_client::LoadTrackedClient;
|
||||||
pub use minimum_peer_version::MinimumPeerVersion;
|
pub use minimum_peer_version::MinimumPeerVersion;
|
||||||
|
#[allow(unused_imports)]
|
||||||
pub use priority::{
|
pub use priority::{
|
||||||
address_is_valid_for_inbound_listeners, address_is_valid_for_outbound_connections,
|
address_is_valid_for_inbound_listeners, address_is_valid_for_outbound_connections,
|
||||||
AttributePreference, PeerPreference,
|
AttributePreference, PeerPreference,
|
||||||
|
|
Loading…
Reference in New Issue