Replace replace(..., None) with take()

This is strictly for simplicity, since Option::take() is imlemented with replace().
This commit is contained in:
Jay Kickliter
2018-09-14 13:13:36 -07:00
committed by Greg Fitzgerald
parent 3ca80c676c
commit fd51599fa8
3 changed files with 4 additions and 5 deletions

View File

@@ -363,7 +363,7 @@ fn is_missing(
recycler: &BlobRecycler,
c_or_d: &str,
) -> bool {
if let Some(blob) = mem::replace(window_slot, None) {
if let Some(blob) = window_slot.take() {
let blob_idx = blob.read().unwrap().get_index().unwrap();
if blob_idx == idx {
trace!("recover {}: idx: {} good {}", id, idx, c_or_d);