[Auto] lib/entry/gps: Fix Clippy warnings

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
flip1995 2019-08-27 10:49:49 +02:00 committed by Matthias Beyer
parent 28e693bdea
commit 839f39435a
1 changed files with 4 additions and 4 deletions

View File

@ -88,17 +88,17 @@ impl FromValue for GPSValue {
Value::Table(ref map) => {
Ok(GPSValue::new(
map.get("degree")
.ok_or_else(|| Error::from(err_msg("Degree missing")))
.ok_or_else(|| err_msg("Degree missing"))
.and_then(&int_to_appropriate_width)?,
map
.get("minutes")
.ok_or_else(|| Error::from(err_msg("Minutes missing")))
.ok_or_else(|| err_msg("Minutes missing"))
.and_then(&int_to_appropriate_width)?,
map
.get("seconds")
.ok_or_else(|| Error::from(err_msg("Seconds missing")))
.ok_or_else(|| err_msg("Seconds missing"))
.and_then(&int_to_appropriate_width)?
))
}
@ -156,7 +156,7 @@ impl FromValue for Coordinates {
.and_then(|t| {
let get = |m: &Map<_, _>, what: &'static str, ek| -> Result<GPSValue> {
m.get(what)
.ok_or_else(|| Error::from(err_msg(ek)))
.ok_or_else(|| err_msg(ek))
.and_then(GPSValue::from_value)
};