summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Otto <th1000s@posteo.net>2022-01-14 00:33:56 +0100
committerDan Davison <dandavison7@gmail.com>2022-01-13 19:53:28 -0500
commitc323fa529ba3188ceff041509ed2b0a44226f7bc (patch)
tree6d1afc862afb1a2dce038935270a73c880a08d6d
parent056c18645929da1a86de2e2e30ceb6542d1362a0 (diff)
Fix new 1.58 clippy lints
-rw-r--r--src/ansi/mod.rs2
-rw-r--r--src/utils/process.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ansi/mod.rs b/src/ansi/mod.rs
index fe27bbe6..a634b675 100644
--- a/src/ansi/mod.rs
+++ b/src/ansi/mod.rs
@@ -168,7 +168,7 @@ pub fn explain_ansi(line: &str, colorful: bool) -> String {
if colorful {
format!("({}){}", style.to_painted_string(), style.paint(s))
} else {
- format!("({}){}", style.to_string(), s)
+ format!("({}){}", style, s)
}
})
.collect()
diff --git a/src/utils/process.rs b/src/utils/process.rs
index f111e9d4..224eab87 100644
--- a/src/utils/process.rs
+++ b/src/utils/process.rs
@@ -481,7 +481,7 @@ where
*/
let pid_range = my_pid.saturating_sub(10)..my_pid.saturating_add(20);
- for p in pid_range.clone() {
+ for p in pid_range {
// Processes which were not refreshed do not exist for sysinfo, so by selectively
// letting it know about processes the `find_sibling..` function will only
// consider these.