aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-geoip/src/dense_range_map.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* geoip: Use tor-geoip-db as source of data.Nick Mathewson2026-04-161-0/+20
|
* geoip: Add export functionalityNick Mathewson2026-04-161-0/+11
| | | | | This is perma-unstable: We'll use it to make an export tool, but that's it.
* geoip: Change DenseRangeMap to use Cow.Nick Mathewson2026-04-161-9/+30
| | | | | This change allows us to provide the parts of the DenseRangeMap on the data segment.
* geoip: rename internal get to get1.Nick Mathewson2026-04-151-39/+38
|
* geoip: Make asn data conditional.Nick Mathewson2026-04-151-47/+117
| | | | | | | | | | | | This abolishes the NetDefn type, and turns DenseRangeDb into a map to one or (optionally!) two types. For the DBs we ship, which don't have asn information, this saves about 2.5 MiB. (It also probably saves a bit more, since the niche optimization didn't apply to NetDefn as it existed before, since it tried to distinguish Some(None,None) from None.)
* geoip: Migrate code to DenseRangeMap.Nick Mathewson2026-04-151-2/+14
| | | | | This required correcting some errors in our previous ersatz geoip databases.
* geoip: Add new internal DenseRangeMap typeNick Mathewson2026-04-151-0/+446
This type is more space-efficient than RangeInclusiveMap in the case where most ranges do not have gaps between them.