From bccd3412c12e5133d40ed21518358676311ad796 Mon Sep 17 00:00:00 2001 From: Jan Danielsson Date: Sun, 18 Jun 2023 15:29:58 +0200 Subject: [PATCH 1/2] Add a missing backtick in sync_with_result_callback() documentation. --- crates/matrix-sdk/src/client/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/matrix-sdk/src/client/mod.rs b/crates/matrix-sdk/src/client/mod.rs index 3ba0cca1ae1..828fee91bf6 100644 --- a/crates/matrix-sdk/src/client/mod.rs +++ b/crates/matrix-sdk/src/client/mod.rs @@ -2345,12 +2345,12 @@ impl Client { /// /// * `callback` - A callback that will be called every time after a /// response has been received, failure or not. The callback returns a - /// `Result, too. When returning `Ok(LoopCtrl::Continue)` - /// the sync will continue, if the callback returns `Ok(LoopCtrl::Break)` - /// the sync will be stopped and the function returns `Ok(())`. In case - /// the callback can't handle the `Error` or has a different malfunction, - /// it can return an `Err(Error)`, which results in the sync ending and - /// the `Err(Error)` being returned. + /// `Result`, too. When returning + /// `Ok(LoopCtrl::Continue)` the sync will continue, if the callback + /// returns `Ok(LoopCtrl::Break)` the sync will be stopped and the + /// function returns `Ok(())`. In case the callback can't handle the + /// `Error` or has a different malfunction, it can return an `Err(Error)`, + /// which results in the sync ending and the `Err(Error)` being returned. /// /// # Return /// The sync runs until an error occurs that the callback can't handle or From 75cf57296836bd9c95083978883f03ceb7c65778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 19 Jun 2023 09:38:15 +0200 Subject: [PATCH 2/2] Fix the formatting of the sync_with_result_callbac() docstring --- crates/matrix-sdk-ui/src/room_list/state.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/matrix-sdk-ui/src/room_list/state.rs b/crates/matrix-sdk-ui/src/room_list/state.rs index 989b0fd781c..10b79fdc56a 100644 --- a/crates/matrix-sdk-ui/src/room_list/state.rs +++ b/crates/matrix-sdk-ui/src/room_list/state.rs @@ -47,9 +47,10 @@ impl State { FirstRooms => (AllRooms, Actions::first_rooms_are_loaded()), AllRooms => (CarryOn, Actions::none()), CarryOn => (CarryOn, Actions::none()), - // If the state was `Terminated`, the next state is calculated again, because it means the - // sync has been restarted. In this case, let's jump back on the previous state that led - // to the termination. No action is required in this scenario. + // If the state was `Terminated`, the next state is calculated again, because it means + // the sync has been restarted. In this case, let's jump back on the + // previous state that led to the termination. No action is required in this + // scenario. Terminated { from: previous_state } => { match previous_state.as_ref() { state @ Init | state @ FirstRooms => {