allow spaces in a geoRadius

This commit is contained in:
Tamo 2021-08-31 18:48:40 +02:00
parent 13c78e5aa2
commit 4820ac71a6
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() })?;
let point = point
.split(',')
.map(|el| el.parse())
.map(|el| el.trim()).parse()
.collect::<Result<Vec<f64>, _>>()
.map_err(|_| UserError::InvalidCriterionName { name: text.to_string() })?;
Ok(Member::Geo([point[0], point[1]]))