diff options
author | Thomas O'Donnell <andytom@users.noreply.github.com> | 2020-01-18 08:15:08 +0100 |
---|---|---|
committer | Kevin Song <chipbuster@users.noreply.github.com> | 2020-01-18 01:15:08 -0600 |
commit | 197376633a0f28558bb8ad6ceb50ae9c2cd34be0 (patch) | |
tree | 69cdb138fe777c8fa083276ec9fa18c0bf912c0f /src | |
parent | 8f645ffb8a090cf900883ca50bba423298c4a4f1 (diff) |
fix: Fix incorrect prefix usage in cmd_duration module (#832)
Fixed the way the cmd_duration module is setting it's prefix to be the
same as the other modules.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/cmd_duration.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/cmd_duration.rs b/src/modules/cmd_duration.rs index 6c13798dd..3555701d6 100644 --- a/src/modules/cmd_duration.rs +++ b/src/modules/cmd_duration.rs @@ -36,13 +36,11 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { }; module.set_style(module_color); - let cmd_duration_stacked = &format!( - "{}{}", - config.prefix, - render_time(elapsed, config.show_milliseconds) + module.create_segment( + "cmd_duration", + &SegmentConfig::new(&render_time(elapsed, config.show_milliseconds)), ); - module.create_segment("cmd_duration", &SegmentConfig::new(&cmd_duration_stacked)); - module.get_prefix().set_value(""); + module.get_prefix().set_value(config.prefix); Some(module) } |