fix(cli): 🚑 incorrect import in tui macros

This commit is contained in:
Lucas Colombo 2024-09-17 18:18:49 -03:00
parent da204857b7
commit d87321ba3e
Signed by: lucas
GPG Key ID: EF34786CFEFFAE35
2 changed files with 3 additions and 2 deletions

View File

@ -200,6 +200,7 @@ pub fn key_event_to_string(key_event: &KeyEvent) -> String {
key key
} }
/// Parses a string into a vector of [`KeyEvent`]
pub fn parse_key_sequence(raw: &str) -> Result<Vec<KeyEvent>> { pub fn parse_key_sequence(raw: &str) -> Result<Vec<KeyEvent>> {
if raw.chars().filter(|c| *c == '>').count() != raw.chars().filter(|c| *c == '<').count() { if raw.chars().filter(|c| *c == '>').count() != raw.chars().filter(|c| *c == '<').count() {
return Err(eyre::eyre!("Invalid key sequence: `{}`", raw)); return Err(eyre::eyre!("Invalid key sequence: `{}`", raw));

View File

@ -42,7 +42,7 @@ macro_rules! components {
$( $(
temp_vec.push( temp_vec.push(
Box::new($x) Box::new($x)
as Box<dyn lool::cli::tui::framework::component::Component $( $t + )* > as Box<dyn lool::tui::Component $( $t + )* >
); );
)* )*
temp_vec temp_vec
@ -58,7 +58,7 @@ macro_rules! children {
$( $(
map.insert( map.insert(
$name.to_string(), $name.to_string(),
Box::new($value) as Box<dyn lool::cli::tui::framework::component::Component> Box::new($value) as Box<dyn lool::tui::Component>
); );
)* )*
map map