0.34.6_repo_cleanup
This commit is contained in:
1 parent
ce1a90397c
commit
133d2f0f91
273 files changed
+5969
-6926
No files matched your search
@@ -1,5 +1,3 @@
|
||||
//! Bounded country GeoIP reader for direct CSV pairs and native MaxMind DB files.
|
||||
//! Managed downloads use direct HTTPS sources; publisher checksum URLs are optional.
|
||||
mod mmdb;
|
||||
mod update;
|
||||
mod update_http;
|
||||
@@ -29,8 +27,6 @@ struct V4Range {
|
||||
}
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
struct V6Range {
|
||||
// Network byte order preserves the numeric ordering of IPv6 addresses
|
||||
// without the 16-byte alignment/padding of u128 fields.
|
||||
start: [u8; 16],
|
||||
end: [u8; 16],
|
||||
country: [u8; 2],
|
||||
@@ -83,8 +79,6 @@ impl Database {
|
||||
let ipv4 = parse_v4(&directory.join("user-country-ipv4.csv"))?;
|
||||
let ipv6 = parse_v6(&directory.join("user-country-ipv6.csv"))?;
|
||||
ensure!(!ipv4.is_empty() && !ipv6.is_empty(), "GeoIP country database is empty");
|
||||
// Convert to exactly sized immutable slices: the CSV parser may have
|
||||
// doubled Vec capacity many times during loading.
|
||||
Ok(Self { backend: Backend::Csv { ipv4: ipv4.into_boxed_slice(), ipv6: ipv6.into_boxed_slice() } })
|
||||
}
|
||||
DatabaseFormat::Mmdb => Ok(Self {
|
||||
|
||||
Reference in new issue
Block a user