refactor(bindings): fix formatting issues

This commit is contained in:
lalvarezt 2025-07-23 13:01:43 +02:00
parent 057b18c63a
commit 3cca8ad9bc
3 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,5 @@
use crate::{ use crate::{
channels::prototypes::Template, channels::prototypes::Template, event::Key,
event::Key,
screen::result_item::ResultItem, screen::result_item::ResultItem,
}; };
use devicons::FileIcon; use devicons::FileIcon;

View File

@ -11,7 +11,6 @@ use std::ops::{Deref, DerefMut};
use std::str::FromStr; use std::str::FromStr;
use tracing::{debug, trace}; use tracing::{debug, trace};
/// Generic bindings structure that can map any key type to actions /// Generic bindings structure that can map any key type to actions
/// Generic bindings structure that maps any key type to actions. /// Generic bindings structure that maps any key type to actions.
/// ///
@ -802,7 +801,10 @@ where
while let Some((key_str, raw_value)) = while let Some((key_str, raw_value)) =
map.next_entry::<String, Value>()? map.next_entry::<String, Value>()?
{ {
trace!("Processing binding: key='{}', value={:?}", key_str, raw_value); trace!(
"Processing binding: key='{}', value={:?}",
key_str, raw_value
);
let key = K::from_str(&key_str).map_err(|e| { let key = K::from_str(&key_str).map_err(|e| {
debug!("Failed to parse key '{}': {}", key_str, e); debug!("Failed to parse key '{}': {}", key_str, e);
Error::custom(e) Error::custom(e)
@ -823,7 +825,10 @@ where
debug!("Failed to deserialize actions for key '{}': {}", key_str, e); debug!("Failed to deserialize actions for key '{}': {}", key_str, e);
Error::custom(e) Error::custom(e)
})?; })?;
trace!("Binding key '{}' to actions: {:?}", key_str, actions); trace!(
"Binding key '{}' to actions: {:?}",
key_str, actions
);
bindings.insert(key, actions); bindings.insert(key, actions);
} }
} }

View File

@ -14,9 +14,7 @@ use std::{
}; };
use tracing::{debug, warn}; use tracing::{debug, warn};
pub use keybindings::{ pub use keybindings::{EventBindings, EventType, KeyBindings, merge_bindings};
EventBindings, EventType, KeyBindings, merge_bindings,
};
pub use themes::Theme; pub use themes::Theme;
pub use ui::UiConfig; pub use ui::UiConfig;