fix a bug

This commit is contained in:
Tamo 2021-09-01 10:56:19 +02:00
parent 7483614b75
commit dc84ecc40b
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69

View File

@ -84,7 +84,7 @@ impl FromStr for Member {
.ok_or_else(|| UserError::InvalidCriterionName { name: text.to_string() })?; .ok_or_else(|| UserError::InvalidCriterionName { name: text.to_string() })?;
let point = point let point = point
.split(',') .split(',')
.map(|el| el.trim()).parse() .map(|el| el.trim().parse())
.collect::<Result<Vec<f64>, _>>() .collect::<Result<Vec<f64>, _>>()
.map_err(|_| UserError::InvalidCriterionName { name: text.to_string() })?; .map_err(|_| UserError::InvalidCriterionName { name: text.to_string() })?;
Ok(Member::Geo([point[0], point[1]])) Ok(Member::Geo([point[0], point[1]]))