Skip to content

Commit

Permalink
fixed unused imports and another version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
AndGem committed May 15, 2022
1 parent 0fbd95b commit c0c271f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2018"
clap = "2.33.3"
geojson = { version = "0.22.3", features=["geo-types"] }
geo-types = "0.7.4"
osmpbfreader = "0.15.1"
osmpbfreader = "0.15.2"
serde_json = "1.0.80"
smartstring = { version = "*", features = ["proptest", "serde"] }

Expand Down
11 changes: 6 additions & 5 deletions src/osm_reader.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
use osmpbfreader::{Node, NodeId, OsmPbfReader, Relation, RelationId, WayId, Tags};
use osmpbfreader::{Node, NodeId, OsmPbfReader, Relation, RelationId, WayId};

use std::collections::{HashMap, HashSet};
use std::i8::MAX;
use std::time::Instant;
use std::iter::FromIterator;

use smartstring::alias::String;

use crate::utils::hashmap_values_to_set;

Expand Down Expand Up @@ -100,7 +97,7 @@ fn find_admin_boundary_relations(
.map(|relation| (relation.id, relation))
.collect();

println!("parsing relations finished! {}s", now.elapsed().as_secs());
println!("finished parsing {} relations! {}s", relation_id_to_relation.len(), now.elapsed().as_secs());
relation_id_to_relation
}

Expand Down Expand Up @@ -158,6 +155,10 @@ fn find_nodes_for_node_ids(pbf: &mut OsmPbfReaderFile, node_ids: HashSet<NodeId>
#[cfg(test)]
mod tests {
use super::*;
use std::iter::FromIterator;
use osmpbfreader::Tags;

use smartstring::alias::String;

#[test]
fn test_empty_relation_has_not_proper_admin_level() {
Expand Down

0 comments on commit c0c271f

Please sign in to comment.