style: Fix clippy warnings

Depends on D96634

Differential Revision: https://phabricator.services.mozilla.com/D96636
This commit is contained in:
Sylvestre Ledru 2020-11-17 12:02:22 +00:00 committed by Emilio Cobos Álvarez
parent 191d5226a3
commit a95ce79554
6 changed files with 13 additions and 16 deletions

View file

@ -37,7 +37,7 @@ pub struct NthIndexCacheInner(FxHashMap<OpaqueElement, i32>);
impl NthIndexCacheInner {
/// Does a lookup for a given element in the cache.
pub fn lookup(&mut self, el: OpaqueElement) -> Option<i32> {
self.0.get(&el).map(|x| *x)
self.0.get(&el).copied()
}
/// Inserts an entry into the cache.