optimize: avoid a copy of found events

This commit is contained in:
Mike Dilger 2024-08-08 08:32:09 +12:00
parent a4b8c83a08
commit 53b72c0b44

View File

@ -1633,10 +1633,9 @@ impl Storage {
} }
Ok(output Ok(output
.iter() .into_iter()
.rev() .rev()
.take(limit) .take(limit)
.cloned() // FIXME when BTreeSet gets a drain() function
.collect()) .collect())
} }