Updated Ratatui, created custom deserialization logic for i64s to make life easier, and used string interpolation where possible to reduce the lines needed to write log messages or create formatted text
This commit is contained in:
@@ -9,7 +9,7 @@ pub(in crate::app) type ContextClue = (KeyBinding, &'static str);
|
||||
pub fn build_context_clue_string(context_clues: &[(KeyBinding, &str)]) -> String {
|
||||
context_clues
|
||||
.iter()
|
||||
.map(|(key_binding, desc)| format!("{} {}", key_binding.key, desc))
|
||||
.map(|(key_binding, desc)| format!("{} {desc}", key_binding.key))
|
||||
.collect::<Vec<String>>()
|
||||
.join(" | ")
|
||||
}
|
||||
|
||||
+2
-2
@@ -54,13 +54,13 @@ impl<'a> App<'a> {
|
||||
}
|
||||
|
||||
pub async fn dispatch_network_event(&mut self, action: NetworkEvent) {
|
||||
debug!("Dispatching network event: {:?}", action);
|
||||
debug!("Dispatching network event: {action:?}");
|
||||
|
||||
self.is_loading = true;
|
||||
if let Some(network_tx) = &self.network_tx {
|
||||
if let Err(e) = network_tx.send(action).await {
|
||||
self.is_loading = false;
|
||||
error!("Failed to send event. {:?}", e);
|
||||
error!("Failed to send event. {e:?}");
|
||||
self.handle_error(anyhow!(e));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user