From 139f3d47d016c8f44ae2208c0fd3d3a58507f0f1 Mon Sep 17 00:00:00 2001 From: cjriley9 Date: Sun, 3 Oct 2021 13:12:52 -0600 Subject: [PATCH] fixed an issue found by clippy --- src/core.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.rs b/src/core.rs index 7714d3c..09344e7 100644 --- a/src/core.rs +++ b/src/core.rs @@ -95,7 +95,7 @@ pub fn encode(c: Coordinate, len: usize) -> Result { return Err(GeohashError::InvalidCoordinateRange(c)); } - if len < 1 || len > 12 { + if !(1..=12).contains(&len) { return Err(GeohashError::InvalidLength(len)); }