chore(clippy): prefer Path to PathBuf
This commit is contained in:
parent
d793ad8313
commit
5e1427c563
@ -903,14 +903,14 @@ mod tests {
|
||||
}
|
||||
|
||||
trait CountsExt {
|
||||
fn checked_removal(&mut self, key: &PathBuf, expected: usize);
|
||||
fn checked_removal(&mut self, key: &Path, expected: usize);
|
||||
}
|
||||
|
||||
impl CountsExt for HashMap<PathBuf, usize> {
|
||||
fn checked_removal(&mut self, key: &PathBuf, expected: usize) {
|
||||
fn checked_removal(&mut self, key: &Path, expected: usize) {
|
||||
use std::collections::hash_map::Entry::*;
|
||||
|
||||
match self.entry(key.clone()) {
|
||||
match self.entry(key.to_owned()) {
|
||||
Occupied(oe) => {
|
||||
assert_eq!(oe.remove(), expected);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user