Simplify using early return and Result::ok()
This commit is contained in:
@ -60,13 +60,13 @@ fn find_next_missing(
|
||||
recycler.recycle(blob, "find_next_missing");
|
||||
}
|
||||
}
|
||||
if slot.data.is_none() {
|
||||
|
||||
if slot.data.is_some() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let val = crdt.read().unwrap().window_index_request(pix as u64);
|
||||
if let Ok((to, req)) = val {
|
||||
return Some((to, req));
|
||||
}
|
||||
}
|
||||
None
|
||||
val.ok()
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
Reference in New Issue
Block a user