~matthiasbeyer/imag

836fd69eca344dac7a18aab28ca5b410d4cdd2d6 — Matthias Beyer 3 months ago 48ba74e master master-ff
Fix clippy: No need to wrap in Err(_) here

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
1 files changed, 1 insertions(+), 1 deletions(-)

M bin/core/imag-gps/src/lib.rs
M bin/core/imag-gps/src/lib.rs => bin/core/imag-gps/src/lib.rs +1 -1
@@ 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."))?;