refactor: Clean up format strings

This commit is contained in:
Jonas Platte
2023-01-26 12:47:28 +01:00
committed by Jonas Platte
parent 6d868908cb
commit c481caf060
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -328,7 +328,7 @@ impl Client {
return LoopCtrl::Break;
}
tracing::warn!("Ignoring sync error: {:?}", sync_error);
tracing::warn!("Ignoring sync error: {sync_error:?}");
LoopCtrl::Continue
}
}
@@ -91,7 +91,7 @@ impl SecretInfo {
pub fn as_key(&self) -> String {
match &self {
SecretInfo::KeyRequest(info) => format!(
"keyRequest:{:}:{:}:{:}",
"keyRequest:{}:{}:{}",
info.room_id().as_str(),
info.session_id(),
&info.algorithm(),
+1 -1
View File
@@ -218,7 +218,7 @@ impl Update<Msg> for Model {
match tl.send(RoomMessageEventContent::text_plain(m).into(), None).await
{
Ok(_r) => tracing::info!("Message send"),
Err(e) => tracing::error!("Sending message failed: {:}", e),
Err(e) => tracing::error!("Sending message failed: {e}"),
}
});
} else {
+4 -4
View File
@@ -47,7 +47,7 @@ pub async fn run_client(
pin_mut!(stream);
if let Some(Err(e)) = stream.next().await {
error!("Stopped: Initial Query on sliding sync failed: {:?}", e);
error!("Stopped: Initial Query on sliding sync failed: {e:?}");
return Ok(());
}
@@ -71,7 +71,7 @@ pub async fn run_client(
let _ = tx.send(ssync_state.clone()).await;
}
Some(Err(e)) => {
error!("Error: {:}", e);
error!("Error: {e}");
break;
}
None => {
@@ -107,12 +107,12 @@ pub async fn run_client(
}
match update {
Ok(update) => {
info!("Live update received: {:?}", update);
info!("Live update received: {update:?}");
tx.send(ssync_state.clone()).await?;
err_counter = 0;
}
Err(e) => {
warn!("Live update error: {:?}", e);
warn!("Live update error: {e:?}");
err_counter += 1;
if err_counter > 3 {
error!("Received 3 errors in a row. stopping.");
+1 -1
View File
@@ -46,7 +46,7 @@ impl MockComponent for StatusBar {
}
} else {
tabs.push(Spans::from(format!(
"Loaded {:} rooms in {}s",
"Loaded {} rooms in {}s",
self.sstate.loaded_rooms_count(),
self.sstate.started().elapsed().as_secs()
)));