diff --git a/src/modules/memory_usage.rs b/src/modules/memory_usage.rs index e3b7918c..b8fe4fbf 100644 --- a/src/modules/memory_usage.rs +++ b/src/modules/memory_usage.rs @@ -12,10 +12,6 @@ pub fn module<'a>(context: &'a Context) -> Option> { let mut module = context.new_module("memory_usage"); - if module.config_value_bool("disabled").unwrap_or(true) { - return None; - } - let module_style = module .config_value_style("style") .unwrap_or_else(|| Color::White.bold().dimmed()); diff --git a/src/modules/time.rs b/src/modules/time.rs index 344c17cf..d86ba01a 100644 --- a/src/modules/time.rs +++ b/src/modules/time.rs @@ -7,10 +7,6 @@ use super::{Context, Module}; pub fn module<'a>(context: &'a Context) -> Option> { let mut module = context.new_module("time"); - if module.config_value_bool("disabled").unwrap_or(true) { - return None; - } - let module_style = module .config_value_style("style") .unwrap_or_else(|| Color::Yellow.bold()); diff --git a/tests/testsuite/time.rs b/tests/testsuite/time.rs index a253162f..ae2e1f16 100644 --- a/tests/testsuite/time.rs +++ b/tests/testsuite/time.rs @@ -11,13 +11,8 @@ should not display when disabled, should display *something* when enabled, and should have the correct prefixes and suffixes in a given config */ #[test] -fn config_enabled() -> io::Result<()> { - let output = common::render_module("time") - .use_config(toml::toml! { - [time] - disabled = false - }) - .output()?; +fn config_default() -> io::Result<()> { + let output = common::render_module("time").output()?; let actual = String::from_utf8(output.stdout).unwrap(); // We can't test what it actually is...but we can assert it's not blank @@ -25,22 +20,11 @@ fn config_enabled() -> io::Result<()> { Ok(()) } -#[test] -fn config_blank() -> io::Result<()> { - let output = common::render_module("time").output()?; - let actual = String::from_utf8(output.stdout).unwrap(); - - let expected = ""; - assert_eq!(expected, actual); - Ok(()) -} - #[test] fn config_check_prefix_and_suffix() -> io::Result<()> { let output = common::render_module("time") .use_config(toml::toml! { [time] - disabled = false format = "[%T]" }) .output()?;