aboutsummaryrefslogtreecommitdiffstats
path: root/src/widgets/mode.rs
diff options
context:
space:
mode:
authorDaniel Jankowski <daniel.jankowski@rub.de>2023-12-17 15:56:40 +0100
committerDaniel Jankowski <daniel.jankowski@rub.de>2023-12-17 15:56:40 +0100
commit19b8d9d63c55ade8b1a2fc70732756ae161909b4 (patch)
tree3d60c361b89a46ca2f8959217e1298d7a288aebb /src/widgets/mode.rs
parentfeat: add bench for render_bar (diff)
downloadsl0pstatus-19b8d9d63c55ade8b1a2fc70732756ae161909b4.tar.gz
sl0pstatus-19b8d9d63c55ade8b1a2fc70732756ae161909b4.tar.xz
sl0pstatus-19b8d9d63c55ade8b1a2fc70732756ae161909b4.zip
chore: ref config instead of copying
Diffstat (limited to 'src/widgets/mode.rs')
-rw-r--r--src/widgets/mode.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/mode.rs b/src/widgets/mode.rs
index 0cd68ac..db73544 100644
--- a/src/widgets/mode.rs
+++ b/src/widgets/mode.rs
@@ -25,7 +25,7 @@ pub struct ModeWidget {
}
impl ModeWidget {
- pub fn new(config: BTreeMap<String, String>) -> Self {
+ pub fn new(config: &BTreeMap<String, String>) -> Self {
let normal_format = match config.get("mode_normal") {
Some(form) => FormattedPart::multiple_from_format_string(form.to_owned()),
None => vec![],