commit 8bce98b3b527b751385623cd17fc1a747c117d98
parent a789ab32f2191f191370f614cccd4f80bfc7e59b
Author: David Goulet <dgoulet@torproject.org>
Date: Wed, 22 Jan 2025 08:59:03 -0500
scripts: Fix rust clippy warning
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/maint/geoip/geoip-db-tool/src/db.rs b/scripts/maint/geoip/geoip-db-tool/src/db.rs
@@ -96,7 +96,7 @@ where
};
let cc = if let Some(country) = kv.get("country") {
- assert!(country.as_bytes().len() == 2);
+ assert!(country.len() == 2);
country.as_bytes()[0..2].try_into().unwrap()
} else {
*b"??"