dirmgr: remove a needless .borrow()

This fixes a warning from nightly clippy.
This commit is contained in:
Nick Mathewson 2023-05-11 08:38:42 -04:00
parent 78fb64387d
commit c1fea9a67f
1 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
//! Declare a general purpose "document ID type" for tracking which
//! documents we want and which we have.
use std::{borrow::Borrow, collections::HashMap};
use std::collections::HashMap;
use tracing::trace;
use crate::storage::Store;
@ -271,11 +271,10 @@ where
{
let mut result = HashMap::new();
for item in collection.into_iter() {
let b = item.borrow();
let tp = b.doctype();
let tp = item.doctype();
result
.entry(tp)
.or_insert_with(|| DocQuery::empty_from_docid(b))
.or_insert_with(|| DocQuery::empty_from_docid(&item))
.push(item);
}
result