Merge pull request #239 from taskchampion/fix-new-clippy
fix new clippy warnings
This commit is contained in:
@@ -144,10 +144,8 @@ impl TaskDb {
|
|||||||
// if renumbering, clear the working set and re-add
|
// if renumbering, clear the working set and re-add
|
||||||
if renumber {
|
if renumber {
|
||||||
txn.clear_working_set()?;
|
txn.clear_working_set()?;
|
||||||
for elt in new_ws.drain(0..new_ws.len()) {
|
for uuid in new_ws.drain(0..new_ws.len()).flatten() {
|
||||||
if let Some(uuid) = elt {
|
txn.add_to_working_set(uuid)?;
|
||||||
txn.add_to_working_set(uuid)?;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// ..otherwise, just clear the None items determined above from the working set
|
// ..otherwise, just clear the None items determined above from the working set
|
||||||
|
|||||||
@@ -58,13 +58,7 @@ impl WorkingSet {
|
|||||||
self.by_index
|
self.by_index
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.filter_map(|(index, uuid)| {
|
.filter_map(|(index, uuid)| uuid.as_ref().map(|uuid| (index, *uuid)))
|
||||||
if let Some(uuid) = uuid {
|
|
||||||
Some((index, *uuid))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user