Implemented beta clippy lint recommendations (#1051)
This commit is contained in:
committed by
GitHub
parent
3e46c8630d
commit
ecdbe034fa
@@ -25,6 +25,7 @@ use validator_api_requests::models::{
|
||||
};
|
||||
|
||||
#[cfg(feature = "nymd-client")]
|
||||
#[must_use]
|
||||
pub struct Config {
|
||||
api_url: Url,
|
||||
nymd_url: Url,
|
||||
|
||||
@@ -133,6 +133,7 @@ impl DirectSecp256k1HdWallet {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub struct DirectSecp256k1HdWalletBuilder {
|
||||
/// The password to use when deriving a BIP39 seed from a mnemonic.
|
||||
bip39_password: String,
|
||||
|
||||
@@ -112,7 +112,7 @@ impl Client {
|
||||
routes::MIXNODES,
|
||||
routes::REWARDED,
|
||||
routes::INCLUSION_CHANCE,
|
||||
&mixnode_id.to_string(),
|
||||
mixnode_id,
|
||||
],
|
||||
NO_PARAMS,
|
||||
)
|
||||
|
||||
@@ -77,6 +77,7 @@ impl Config {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub struct ConfigBuilder(Config);
|
||||
|
||||
impl ConfigBuilder {
|
||||
|
||||
@@ -54,6 +54,7 @@ impl From<NymTopologyError> for PreparationError {
|
||||
/// an optional reply-SURB, padding it to appropriate length, encrypting its content,
|
||||
/// and chunking into appropriate size [`Fragment`]s.
|
||||
#[cfg_attr(not(target_arch = "wasm32"), derive(Clone))]
|
||||
#[must_use]
|
||||
pub struct MessagePreparer<R: CryptoRng + Rng> {
|
||||
/// Instance of a cryptographically secure random number generator.
|
||||
rng: R,
|
||||
|
||||
@@ -58,6 +58,7 @@ impl MessageReceiver {
|
||||
}
|
||||
|
||||
/// Allows setting non-default number of expected mix hops in the network.
|
||||
#[must_use]
|
||||
pub fn with_mix_hops(mut self, hops: u8) -> Self {
|
||||
self.num_mix_hops = hops;
|
||||
self
|
||||
|
||||
@@ -9,6 +9,7 @@ pub trait Versioned: Clone {
|
||||
}
|
||||
|
||||
pub trait VersionFilterable<T> {
|
||||
#[must_use]
|
||||
fn filter_by_version(&self, expected_version: &str) -> Self;
|
||||
}
|
||||
|
||||
|
||||
@@ -206,10 +206,12 @@ impl NymTopology {
|
||||
true
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn filter_system_version(&self, expected_version: &str) -> Self {
|
||||
self.filter_node_versions(expected_version, expected_version)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn filter_node_versions(
|
||||
&self,
|
||||
expected_mix_version: &str,
|
||||
|
||||
Reference in New Issue
Block a user