geodb_build: fix all cargo check and clippy warnings
- Commit
89f9e5b28017de7f218b124f8bcf223f80251d17- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-17 14:18 UTC (18 days ago)
- Parents
39893cd
Compile-time const assertion; adapted to osm_ingest PassSpec. Verified: check/clippy --all-targets 0 warnings, test 52 passed.
Diff
scripts/networklocation/geodb_build/src/extract_part1.rs
diff --git a/scripts/networklocation/geodb_build/src/extract_part1.rs b/scripts/networklocation/geodb_build/src/extract_part1.rsindex 08d5bb8c4f..ae606fdce5 100644--- a/scripts/networklocation/geodb_build/src/extract_part1.rs+++ b/scripts/networklocation/geodb_build/src/extract_part1.rs@@ -28,9 +28,7 @@ pub fn extract( pbf::run_pass_sink( input, &blobs,- None,- KIND_RELATIONS,- "relations",+ pbf::PassSpec { blob_kinds: None, want: KIND_RELATIONS, label: "relations" }, Vec::<(u8, Attrs, Vec<i64>)>::new, |acc, block| { let mut kinds = 0u8;@@ -91,9 +89,7 @@ pub fn extract( let _ = pbf::run_pass_sink( input, &blobs,- Some(&kinds),- KIND_WAYS,- "ways",+ pbf::PassSpec { blob_kinds: Some(&kinds), want: KIND_WAYS, label: "ways" }, || (Vec::<(u8, Attrs, Vec<i64>)>::new(), Vec::<(i64, Vec<i64>)>::new()), |acc, block| { let mut kinds = 0u8;@@ -214,9 +210,7 @@ pub fn extract( let _ = pbf::run_pass_sink( input, &blobs,- Some(&kinds),- KIND_NODES,- "node features",+ pbf::PassSpec { blob_kinds: Some(&kinds), want: KIND_NODES, label: "node features" }, Vec::<(u8, Attrs, i32, i32)>::new, |acc: &mut Vec<(u8, Attrs, i32, i32)>, block| { let mut kinds = 0u8;
scripts/networklocation/geodb_build/src/format.rs
diff --git a/scripts/networklocation/geodb_build/src/format.rs b/scripts/networklocation/geodb_build/src/format.rsindex 95003602e0..ea4f700846 100644--- a/scripts/networklocation/geodb_build/src/format.rs+++ b/scripts/networklocation/geodb_build/src/format.rs@@ -232,7 +232,7 @@ mod tests { #[test] fn morton_offsets_cannot_overflow_the_interleave() {- assert!(CELL <= (1 << 20), "cell wider than the interleave can represent");+ const { assert!(CELL <= (1 << 20), "cell wider than the interleave can represent") }; // Extremes of a cell. let base_lat = MIN_LAT; let base_lon = MIN_LON;