summaryrefslogtreecommitdiffstats
path: root/src/segment.rs
diff options
context:
space:
mode:
authorNick Young <nick@nickwb.net>2019-09-15 00:23:53 +1000
committerKevin Song <chipbuster@users.noreply.github.com>2019-09-14 09:23:53 -0500
commit7e891f17c1c6f59f7a8be18e83927271f307dd3d (patch)
tree1ef229d198f7f0183f8f6ae4467b14fd8dc89f66 /src/segment.rs
parent8f03c14582ad61bf4f95a6b69642d8052002d03d (diff)
perf: Lazy load files from directory (#335)
Changes context to use `once_cell` to lazily evaluate directory listing on first use.
Diffstat (limited to 'src/segment.rs')
-rw-r--r--src/segment.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/segment.rs b/src/segment.rs
index 8419ec31e..ebae80d51 100644
--- a/src/segment.rs
+++ b/src/segment.rs
@@ -6,7 +6,7 @@ use std::fmt;
/// (e.g. The version that software is running).
pub struct Segment {
/// The segment's name, to be used in configuration and logging.
- name: String,
+ _name: String,
/// The segment's style. If None, will inherit the style of the module containing it.
style: Option<Style>,
@@ -19,7 +19,7 @@ impl Segment {
/// Creates a new segment with default fields.
pub fn new(name: &str) -> Self {
Self {
- name: name.to_string(),
+ _name: name.to_string(),
style: None,
value: "".to_string(),
}