diff --git a/src/git.rs b/src/git.rs index ec9aed8..a637b73 100644 --- a/src/git.rs +++ b/src/git.rs @@ -315,7 +315,6 @@ impl GitRepo { } impl Config { - /* GIT RELATED */ /// Loads the configuration toml from a path in to the Config struct. pub fn new(path: &String) -> Self { debug!("initializing new Config struct"); @@ -330,15 +329,9 @@ impl Config { ) }) } - ////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////// /// Runs associated function on all repos in config /// - /// TODO: need to be made over a generic repo type - /// /// NOTE: currently unused - /// fn on_all(&self, f: F) where F: Fn(&GitRepo), @@ -350,10 +343,6 @@ impl Config { } } /// Runs associated function on all repos in config - /// - /// TODO: need to be made over a generic repo type - /// - /// fn on_all_spinner(&self, op: &str, f: F) where F: Fn(&GitRepo) -> bool, @@ -381,7 +370,7 @@ impl Config { for category in self.categories.values() { match category.links.as_ref() { Some(links) => { - for (_, link) in links.iter() { + for link in links.values() { if !settings::QUIET.load(std::sync::atomic::Ordering::Relaxed) { let mut sp = Spinner::new(Spinners::Dots10, format!("{}: {}", link.name, op)); diff --git a/src/utils/strings.rs b/src/utils/strings.rs index b11eebc..55b28bf 100644 --- a/src/utils/strings.rs +++ b/src/utils/strings.rs @@ -77,17 +77,17 @@ pub const SUCCESS_STRING: &str = "SUCC"; pub const FAILURE_STRING: &str = "FAIL"; pub fn success_str() -> &'static str { - if !settings::EMOJIS.load(Ordering::Relaxed) { - SUCCESS_EMOJI - } else { + if settings::EMOJIS.load(Ordering::Relaxed) { SUCCESS_STRING + } else { + SUCCESS_EMOJI } } pub fn failure_str() -> &'static str { - if !settings::EMOJIS.load(Ordering::Relaxed) { - FAILURE_EMOJI - } else { + if settings::EMOJIS.load(Ordering::Relaxed) { FAILURE_STRING + } else { + FAILURE_EMOJI } }