process_matcher.rs: Fix clippy error

error: implicitly cloning a `String` by calling `to_string` on its dereferenced type
   --> src/uu/pgrep/src/process_matcher.rs:212:8
    |
212 |     Ok(pattern.to_string())
    |        ^^^^^^^^^^^^^^^^^^^ help: consider using: `pattern.clone()`
    |
This commit is contained in:
Tuomas Tynkkynen
2025-11-03 00:29:34 +02:00
parent f636cb9729
commit eb2fefa384
+1 -1
View File
@@ -209,7 +209,7 @@ fn try_get_pattern_from(matches: &ArgMatches) -> UResult<String> {
pattern
};
Ok(pattern.to_string())
Ok(pattern.clone())
}
fn any_matches<T: Eq + Hash>(optional_ids: &Option<HashSet<T>>, id: T) -> bool {