mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +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
|
Ok(output
|
||||||
.iter()
|
.into_iter()
|
||||||
.rev()
|
.rev()
|
||||||
.take(limit)
|
.take(limit)
|
||||||
.cloned() // FIXME when BTreeSet gets a drain() function
|
|
||||||
.collect())
|
.collect())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user