diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/core/imag-gps/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/core/imag-gps/src/lib.rs b/bin/core/imag-gps/src/lib.rs index 594f5926..b276ef36 100644 --- a/bin/core/imag-gps/src/lib.rs +++ b/bin/core/imag-gps/src/lib.rs @@ -115,7 +115,7 @@ fn add(rt: &Runtime) -> Result<()> { let ary = value.split('.') .map(|v| {debug!("Parsing = {}", v); v}) .map(FromStr::from_str) - .map(|elem| elem.or_else(|_| Err(anyhow!("Error while converting number")))) + .map(|elem| elem.map_err(|_| anyhow!("Error while converting number"))) .collect::<Result<Vec<i64>>>()?; let degree = ary.get(0).ok_or_else(|| anyhow!("Degree missing. This value is required."))?; |