diff options
Diffstat (limited to 'src/modules/directory.rs')
-rw-r--r-- | src/modules/directory.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/directory.rs b/src/modules/directory.rs index 8e719c452..a2cafac16 100644 --- a/src/modules/directory.rs +++ b/src/modules/directory.rs @@ -12,12 +12,12 @@ use super::{Context, Module}; /// /// **Truncation** /// Paths will be limited in length to `3` path components by default. -pub fn segment<'a>(context: &'a Context) -> Option<Module<'a>> { +pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { const HOME_SYMBOL: &str = "~"; const DIR_TRUNCATION_LENGTH: usize = 3; let module_color = Color::Cyan.bold(); - let mut module = context.new_module("directory"); + let mut module = context.new_module("directory")?; module.set_style(module_color); let current_dir = &context.current_dir; |