Skip to content

Commit

Permalink
Add an absutil::Tags method needed for osm2streets
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Sep 4, 2022
1 parent b7172f8 commit c5a110b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions abstutil/src/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ impl Tags {
self.0.contains_key(k)
}

pub fn has_any(&self, keys: Vec<&str>) -> bool {
keys.into_iter().any(|key| self.contains_key(key))
}

pub fn is(&self, k: &str, v: &str) -> bool {
self.0.get(k) == Some(&v.to_string())
}
Expand Down

0 comments on commit c5a110b

Please sign in to comment.