]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
scripts: Fix rust clippy warning
authorDavid Goulet <dgoulet@torproject.org>
Wed, 22 Jan 2025 13:59:03 +0000 (08:59 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 22 Jan 2025 14:52:41 +0000 (09:52 -0500)
Signed-off-by: David Goulet <dgoulet@torproject.org>
scripts/maint/geoip/geoip-db-tool/src/db.rs

index 3d631a3f9867748cba6e2d00b288c90783645e5a..979193b0008b274fe085c4e574756170e5aeb01a 100644 (file)
@@ -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"??"