Skip to content

Commit 8ea184b

Browse files
committed
clippy fix
1 parent dfda9e4 commit 8ea184b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/utiles-core/src/fns.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,13 @@ pub fn bounds(x: u32, y: u32, z: u8) -> (f64, f64, f64, f64) {
244244

245245
/// Truncate a longitude to the valid range of -180 to 180.
246246
#[must_use]
247-
pub fn truncate_lng(lng: f64) -> f64 {
247+
pub const fn truncate_lng(lng: f64) -> f64 {
248248
lng.clamp(-180.0, 180.0)
249249
}
250250

251251
/// Truncate a latitude to the valid range of -90 to 90.
252252
#[must_use]
253-
pub fn truncate_lat(lat: f64) -> f64 {
253+
pub const fn truncate_lat(lat: f64) -> f64 {
254254
lat.clamp(-90.0, 90.0)
255255
}
256256

0 commit comments

Comments
 (0)