File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ struct Output {
38
38
nodes : Vec < Node > ,
39
39
ways : Vec < Way > ,
40
40
offset : Vec < usize > ,
41
- grid : HashMap < ( usize , usize ) , Vec < usize > >
41
+ grid : HashMap < ( usize , usize ) , Vec < usize > > ,
42
42
}
43
43
44
44
fn parse_speed ( max_speed : & str , highway : & str ) -> usize {
@@ -205,11 +205,10 @@ fn main() {
205
205
} ;
206
206
let lat_grid = ( latitude * GRID_MULTIPLICATOR as f32 ) as usize ;
207
207
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) ) {
210
209
Some ( id_list) => {
211
210
id_list. push ( * our_id) ;
212
- } ,
211
+ }
213
212
None => {
214
213
let mut new_id_list = Vec :: < usize > :: new ( ) ;
215
214
new_id_list. push ( * our_id) ;
@@ -248,16 +247,18 @@ fn main() {
248
247
shortest_way = distance;
249
248
}
250
249
}
250
+ /*
251
251
println!("zero counter {:?}", counter);
252
252
println!("long counter {:?}", longest_way);
253
253
println!("short counter {:?}", shortest_way);
254
+ */
254
255
255
256
// serialize everything
256
257
let result = Output {
257
258
nodes,
258
259
ways,
259
260
offset,
260
- grid
261
+ grid,
261
262
} ;
262
263
263
264
let output_file = format ! ( "{}{}" , filename. into_string( ) . unwrap( ) , ".fmi" ) ;
You can’t perform that action at this time.
0 commit comments