Skip to content

Commit

Permalink
feat(generic): add generic code test and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Mar 29, 2024
1 parent f0b9e40 commit f9037da
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "berlin-core"
version = "0.2.5"
version = "0.2.6"
edition = "2021"
license = "MIT"
description = "Identify locations and tag them with UN-LOCODEs and ISO-3166-2 subdivisions."
Expand Down
6 changes: 3 additions & 3 deletions src/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ impl Generic {
coordinates: match r.get("c") {
Some(coords) => match coordinates::coordinate_parser(coords) {
Ok(coords) => Some(coords.1),
_ => None
_ => None,
},
None => None
}
None => None,
},
})
}
}
Expand Down
7 changes: 1 addition & 6 deletions tests/test_code_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,7 @@ fn should_search_punctuation(fake_data: &LocationsDb) {

#[rstest]
fn should_search_generic(fake_data: &LocationsDb) {
let search_term = SearchTerm::from_raw_query(
"One1".to_string(),
None,
5,
3,
);
let search_term = SearchTerm::from_raw_query("One1".to_string(), None, 5, 3);
let results = fake_data.search(&search_term);
assert![results.len() == 1, "Found {}", results.len()];

Expand Down

0 comments on commit f9037da

Please sign in to comment.