aboutsummaryrefslogtreecommitdiffstats
path: root/src/render.rs
diff options
context:
space:
mode:
authorDaniel Jankowski <daniel.jankowski@rub.de>2023-12-17 15:18:04 +0100
committerDaniel Jankowski <daniel.jankowski@rub.de>2023-12-17 15:18:04 +0100
commitffad61acab9fa3ec771a911de462fa686bea1d67 (patch)
treeabb2b9f437c9f3ba0997532eeb1fa2960f1f04e5 /src/render.rs
parentchore: update cargo deps (diff)
downloadsl0pstatus-ffad61acab9fa3ec771a911de462fa686bea1d67.tar.gz
sl0pstatus-ffad61acab9fa3ec771a911de462fa686bea1d67.tar.xz
sl0pstatus-ffad61acab9fa3ec771a911de462fa686bea1d67.zip
chore: move from to_string to to_owned
Diffstat (limited to '')
-rw-r--r--src/render.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render.rs b/src/render.rs
index 370b01d..4c2c74f 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -24,13 +24,13 @@ impl FormattedPart {
pub fn multiple_from_format_string(config: String) -> Vec<Self> {
config
.split("#[")
- .map(|c| FormattedPart::from_format_string(c.to_string()))
+ .map(|c| FormattedPart::from_format_string(c.to_owned()))
.collect()
}
pub fn from_format_string(format: String) -> Self {
let format = match format.starts_with("#[") {
- true => format.strip_prefix("#[").unwrap().to_string(),
+ true => format.strip_prefix("#[").unwrap().to_owned(),
false => format,
};
@@ -114,7 +114,7 @@ impl FormattedPart {
match_name.trim_matches(|c| c == '{' || c == '}'),
state,
),
- None => "Use of uninitialized widget".to_string(),
+ None => "Use of uninitialized widget".to_owned(),
};
output = output.replace(match_name, &result);
@@ -131,7 +131,7 @@ impl Default for FormattedPart {
bg: None,
bold: false,
italic: false,
- content: "".to_string(),
+ content: "".to_owned(),
}
}
}