From d56a9cf3a03a55035cb260b090d3bc17a6e0b5c1 Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee <107522312+lavafroth@users.noreply.github.com> Date: Sun, 25 Aug 2024 16:52:27 +0530 Subject: [PATCH] chore: `sweet` use re-exported modules from crate root --- swhkd/src/config.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/swhkd/src/config.rs b/swhkd/src/config.rs index 2c87db1..d64517f 100644 --- a/swhkd/src/config.rs +++ b/swhkd/src/config.rs @@ -1,5 +1,5 @@ use std::path::Path; -use sweet::token::KeyAttribute; +use sweet::KeyAttribute; use sweet::{Definition, SwhkdParser}; use sweet::{ModeInstruction, ParseError}; @@ -192,19 +192,19 @@ pub fn parse_contents(contents: SwhkdParser) -> Result, ParseError> { Ok(modes) } -/// A small function to convert a `sweet::token::Modifier` into the local `Modifier` enum +/// A small function to convert a `sweet::Modifier` into the local `Modifier` enum fn sweet_def_to_kb(def: &Definition) -> KeyBinding { let modifiers = def .modifiers .iter() .filter_map(|m| match m { - sweet::token::Modifier::Super => Some(Modifier::Super), - sweet::token::Modifier::Any => Some(Modifier::Any), - sweet::token::Modifier::Control => Some(Modifier::Control), - sweet::token::Modifier::Alt => Some(Modifier::Alt), - sweet::token::Modifier::Altgr => Some(Modifier::Altgr), - sweet::token::Modifier::Shift => Some(Modifier::Shift), - sweet::token::Modifier::Omission => None, + sweet::Modifier::Super => Some(Modifier::Super), + sweet::Modifier::Any => Some(Modifier::Any), + sweet::Modifier::Control => Some(Modifier::Control), + sweet::Modifier::Alt => Some(Modifier::Alt), + sweet::Modifier::Altgr => Some(Modifier::Altgr), + sweet::Modifier::Shift => Some(Modifier::Shift), + sweet::Modifier::Omission => None, }) .collect();