mirror of
https://github.com/uutils/procps.git
synced 2026-05-06 06:06:43 -04:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user