Fix linter warnings
This commit is contained in:
@@ -67,7 +67,7 @@ where
|
|||||||
/// If the key is not found, return the index where it should be
|
/// If the key is not found, return the index where it should be
|
||||||
/// inserted.
|
/// inserted.
|
||||||
fn index(&self, key: &K) -> usize {
|
fn index(&self, key: &K) -> usize {
|
||||||
match self.keys.binary_search(&key) {
|
match self.keys.binary_search(key) {
|
||||||
Ok(i) => i,
|
Ok(i) => i,
|
||||||
Err(i) => {
|
Err(i) => {
|
||||||
if i >= self.keys.len() {
|
if i >= self.keys.len() {
|
||||||
@@ -100,11 +100,7 @@ where
|
|||||||
|
|
||||||
Box::new((start..=end).filter_map(move |i| {
|
Box::new((start..=end).filter_map(move |i| {
|
||||||
let key = &self.keys[i];
|
let key = &self.keys[i];
|
||||||
if let Some(fields) = self.hashmap.get(key) {
|
self.hashmap.get(key).map(|fields| (key.clone(), fields))
|
||||||
Some((key.clone(), fields))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user