Skip to content

Commit

Permalink
fixed an issue found by clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
cjriley9 committed Oct 3, 2021
1 parent 53ae644 commit 139f3d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub fn encode(c: Coordinate<f64>, len: usize) -> Result<String, GeohashError> {
return Err(GeohashError::InvalidCoordinateRange(c));
}

if len < 1 || len > 12 {
if !(1..=12).contains(&len) {
return Err(GeohashError::InvalidLength(len));
}

Expand Down

0 comments on commit 139f3d4

Please sign in to comment.