Skip to content

Commit 111c15e

Browse files
Update LengthedGeohash.swift
1 parent 461f130 commit 111c15e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/FlitsGeohash/LengthedGeohash.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ public struct LengthedGeohash<Length: GeohashLengthed>: Hashable, Sendable {
141141

142142
public func toLowerLength<L: GeohashLengthed>() -> LengthedGeohash<L>? {
143143
let otherLength = L.length
144+
if otherLength == Length.length {
145+
return self as? LengthedGeohash<L>
146+
}
144147
if otherLength > Length.length {
145148
return nil
146149
}

0 commit comments

Comments
 (0)