summaryrefslogtreecommitdiffstats
path: root/src/configs/rust.rs
diff options
context:
space:
mode:
authorNikodem Rabuliński <nikodemrabulinski@gmail.com>2019-10-06 03:46:14 +0200
committerKevin Song <chipbuster@users.noreply.github.com>2019-10-05 20:46:14 -0500
commit06ba22eb5c12c8cc0892261899ed140bbb51c99a (patch)
tree3137f7ccf6f74dc8a3b404d18f6ef7a2aa56d058 /src/configs/rust.rs
parent044e10de1b1b1821a8108574491f22b8daf48233 (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/rust.rs')
-rw-r--r--src/configs/rust.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/configs/rust.rs b/src/configs/rust.rs
index 2bd257588..911524ab5 100644
--- a/src/configs/rust.rs
+++ b/src/configs/rust.rs
@@ -14,14 +14,8 @@ pub struct RustConfig<'a> {
impl<'a> RootModuleConfig<'a> for RustConfig<'a> {
fn new() -> Self {
RustConfig {
- symbol: SegmentConfig {
- value: "🦀 ",
- style: None,
- },
- version: SegmentConfig {
- value: "",
- style: None,
- },
+ symbol: SegmentConfig::new("🦀 "),
+ version: SegmentConfig::default(),
style: Color::Red.bold(),
disabled: false,
}