Skip to content

Commit a4c2de7

Browse files
authored
Merge pull request #49 from cjmayo/end_matches
replace deprecated trim_right_matches with trim_end_matches
2 parents d3d48f3 + 9a456fe commit a4c2de7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/mail-on-failure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn get_systemd_unit_property(unit: &str, prop: &str) -> Result<String> {
2121
.output()
2222
.map(|out| {
2323
String::from_utf8_lossy(&out.stdout[prop.len() + 1..])
24-
.trim_right_matches('\n')
24+
.trim_end_matches('\n')
2525
.to_owned()
2626
})
2727
}
@@ -60,7 +60,7 @@ fn main() {
6060
.arg("-n")
6161
.output())
6262
.stdout[..])
63-
.trim_right_matches('\n')
63+
.trim_end_matches('\n')
6464
.to_owned();
6565

6666
if hostname.len() == 0 {

0 commit comments

Comments
 (0)