chore(clippy): prefer Path to PathBuf

This commit is contained in:
Mirko von Leipzig 2021-08-02 12:24:44 +02:00
parent d793ad8313
commit 5e1427c563

View File

@ -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);
}