Skip to content

Commit 3a3b545

Browse files
committed
[pre] refactor
1 parent 238eada commit 3a3b545

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pre/src/main.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct Output {
3838
nodes: Vec<Node>,
3939
ways: Vec<Way>,
4040
offset: Vec<usize>,
41-
grid: HashMap<(usize, usize), Vec<usize>>
41+
grid: HashMap<(usize, usize), Vec<usize>>,
4242
}
4343

4444
fn parse_speed(max_speed: &str, highway: &str) -> usize {
@@ -205,11 +205,10 @@ fn main() {
205205
};
206206
let lat_grid = (latitude * GRID_MULTIPLICATOR as f32) as usize;
207207
let lng_grid = (longitude * GRID_MULTIPLICATOR as f32) as usize;
208-
let current_grid = grid.get_mut(&(lat_grid, lng_grid));
209-
match current_grid {
208+
match grid.get_mut(&(lat_grid, lng_grid)) {
210209
Some(id_list) => {
211210
id_list.push(*our_id);
212-
},
211+
}
213212
None => {
214213
let mut new_id_list = Vec::<usize>::new();
215214
new_id_list.push(*our_id);
@@ -248,16 +247,18 @@ fn main() {
248247
shortest_way = distance;
249248
}
250249
}
250+
/*
251251
println!("zero counter {:?}", counter);
252252
println!("long counter {:?}", longest_way);
253253
println!("short counter {:?}", shortest_way);
254+
*/
254255

255256
// serialize everything
256257
let result = Output {
257258
nodes,
258259
ways,
259260
offset,
260-
grid
261+
grid,
261262
};
262263

263264
let output_file = format!("{}{}", filename.into_string().unwrap(), ".fmi");

0 commit comments

Comments
 (0)