summaryrefslogtreecommitdiff
path: root/src/h3/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/h3/mod.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/h3/mod.rs b/src/h3/mod.rs
index 0b1ede9b..beef46bc 100644
--- a/src/h3/mod.rs
+++ b/src/h3/mod.rs
@@ -830,9 +830,12 @@ impl Connection {
// TODO: this also detects when u is not an sh-integer and
// clamps it in the same way. A real structured header parser
// would actually fail to parse.
- let mut u =
- i64::from_str_radix(param.rsplit('=').next().unwrap(), 10)
- .unwrap_or(7);
+ let mut u = param
+ .rsplit('=')
+ .next()
+ .unwrap()
+ .parse::<i64>()
+ .unwrap_or(7);
if !(0..=7).contains(&u) {
u = 7;