Skip to content

Conversation

PsypherPunk
Copy link
Collaborator

@PsypherPunk PsypherPunk commented Feb 12, 2025

as of #651, IP addresses are deduplicated; as this uses a BTreeSet, the original order is not necessarily retained.

  • use retain() to remove duplicated and/or excluded IPs, mutating the original list of IPs but preserving the original order
  • modify the excluded IPs list from a Vec to a BTreeSet to improve performance of those checks

as part of bee-san#651, IP addresses are deduplicated; as this uses a
`BTreeSet`, the original order is not necessarily retained.

use
[`retain()`](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain)
to remove duplicated and/or excluded IPs, mutating the original list of
IPs but preserving the original order.
@bee-san bee-san merged commit f1ef3be into bee-san:master Feb 15, 2025
4 checks passed
@PsypherPunk PsypherPunk deleted the preserve-ip-order branch February 15, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants