clippy: Deny and fix must_use_candidate

This commit is contained in:
Adrian Duke
2026-01-16 22:52:53 +01:00
committed by Lorenz Leutgeb
parent 2df32c0099
commit 53cb8da8ff
13 changed files with 54 additions and 0 deletions
+3
View File
@@ -25,12 +25,14 @@ pub struct SyncSettings {
impl SyncSettings {
/// Set sync timeout. Defaults to [`DEFAULT_SYNC_TIMEOUT`].
#[must_use]
pub fn timeout(mut self, timeout: time::Duration) -> Self {
self.timeout = timeout;
self
}
/// Set replicas.
#[must_use]
pub fn replicas(mut self, replicas: sync::ReplicationFactor) -> Self {
self.replicas = replicas;
self
@@ -44,6 +46,7 @@ impl SyncSettings {
/// Use profile to populate sync settings, by adding preferred seeds if no seeds are specified,
/// and removing the local node from the set.
#[must_use]
pub fn with_profile(mut self, profile: &Profile) -> Self {
// If no seeds were specified, add the preferred seeds.
if self.seeds.is_empty() {