diff options
author | Nikodem Rabuliński <nikodemrabulinski@gmail.com> | 2019-10-06 03:46:14 +0200 |
---|---|---|
committer | Kevin Song <chipbuster@users.noreply.github.com> | 2019-10-05 20:46:14 -0500 |
commit | 06ba22eb5c12c8cc0892261899ed140bbb51c99a (patch) | |
tree | 3137f7ccf6f74dc8a3b404d18f6ef7a2aa56d058 /src/configs/dotnet.rs | |
parent | 044e10de1b1b1821a8108574491f22b8daf48233 (diff) |
refactor: Implement Default for SegmentConfig (#495)
Implements the Default trait for SegmentConfig to clean up construction of empty segments.
Also adds a segment::new() function to ease construction of simple segments.
Diffstat (limited to 'src/configs/dotnet.rs')
-rw-r--r-- | src/configs/dotnet.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/configs/dotnet.rs b/src/configs/dotnet.rs index 084798c6d..f6bb59e40 100644 --- a/src/configs/dotnet.rs +++ b/src/configs/dotnet.rs @@ -15,14 +15,8 @@ pub struct DotnetConfig<'a> { impl<'a> RootModuleConfig<'a> for DotnetConfig<'a> { fn new() -> Self { DotnetConfig { - symbol: SegmentConfig { - value: "•NET ", - style: None, - }, - version: SegmentConfig { - value: "", - style: None, - }, + symbol: SegmentConfig::new("•NET "), + version: SegmentConfig::default(), style: Color::Blue.bold(), heuristic: true, disabled: false, |