mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 00:11:01 +00:00
optimize: avoid a copy of found events
This commit is contained in:
parent
a4b8c83a08
commit
53b72c0b44
@ -1633,10 +1633,9 @@ impl Storage {
|
||||
}
|
||||
|
||||
Ok(output
|
||||
.iter()
|
||||
.into_iter()
|
||||
.rev()
|
||||
.take(limit)
|
||||
.cloned() // FIXME when BTreeSet gets a drain() function
|
||||
.collect())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user