Replace replace(..., None) with take()
This is strictly for simplicity, since Option::take() is imlemented with replace().
This commit is contained in:
committed by
Greg Fitzgerald
parent
3ca80c676c
commit
fd51599fa8
@@ -34,7 +34,7 @@ impl WindowSlot {
|
||||
}
|
||||
|
||||
fn clear_data(&mut self, recycler: &BlobRecycler) {
|
||||
if let Some(blob) = mem::replace(&mut self.data, None) {
|
||||
if let Some(blob) = self.data.take() {
|
||||
recycler.recycle(blob, "WindowSlot::clear_data");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user