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:
Dark-Alex-17 committed 2023-09-07 17:20:38 -06:00
1 parent e13d1ece58
commit b16a58deae
43 files changed
+426 -536

No files matched your search

+1 -1
View File
@@ -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
View File
@@ -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));
}
}