Fix clippy warnings (#3085)

* Run clippy fix

* Clippy v2

* Make const item static

* Cargo fmt
This commit is contained in:
Dennis Kobert
2025-08-23 11:45:47 +02:00
committed by GitHub
parent c6ec3a27ca
commit 7377871106
47 changed files with 218 additions and 258 deletions
+3 -1
View File
@@ -551,13 +551,15 @@ fn round_point(point: DVec2) -> I64Vec2 {
(point * ROUNDING_FACTOR).round().as_i64vec2()
}
type Edges = SmallVec<[(PathSegment, u8, MajorEdgeKey, MajorEdgeKey); 2]>;
fn find_vertices(edges: &[MajorGraphEdgeStage1]) -> MajorGraph {
let mut graph = MajorGraph {
edges: SlotMap::with_capacity_and_key(edges.len() * 2),
vertices: SlotMap::with_capacity_and_key(edges.len()),
};
let mut vertex_pair_id_to_edges: HashMap<_, SmallVec<[(PathSegment, u8, MajorEdgeKey, MajorEdgeKey); 2]>> = new_hash_map(edges.len());
let mut vertex_pair_id_to_edges: HashMap<_, Edges> = new_hash_map(edges.len());
let mut vertex_hashmap: HashMap<I64Vec2, MajorVertexKey> = new_hash_map(edges.len() * 2);
for (seg, parent) in edges {