From baa869552f4557fbf6bcf56bbf2cefa25722387c Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 17 Mar 2022 14:23:11 +0100 Subject: [PATCH] Implement Default for SyncSettings in terms of SyncSettings::new MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … rather than the other way around. --- crates/matrix-sdk/src/config/sync.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/matrix-sdk/src/config/sync.rs b/crates/matrix-sdk/src/config/sync.rs index b19b77522..d2a761e16 100644 --- a/crates/matrix-sdk/src/config/sync.rs +++ b/crates/matrix-sdk/src/config/sync.rs @@ -29,7 +29,7 @@ pub struct SyncSettings<'a> { impl<'a> Default for SyncSettings<'a> { fn default() -> Self { - Self { filter: None, timeout: Some(DEFAULT_SYNC_TIMEOUT), token: None, full_state: false } + Self::new() } } @@ -37,7 +37,7 @@ impl<'a> SyncSettings<'a> { /// Create new default sync settings. #[must_use] pub fn new() -> Self { - Default::default() + Self { filter: None, timeout: Some(DEFAULT_SYNC_TIMEOUT), token: None, full_state: false } } /// Set the sync token.