We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ca257e commit 8858671Copy full SHA for 8858671
sqlx-postgres/src/types/point.rs
@@ -55,11 +55,11 @@ impl FromStr for PgPoint {
55
let nums = sanitised.split(',').collect::<Vec<&str>>();
56
57
let x = nums
58
- .get(0)
+ .first()
59
.map(|str| parse_float_from_str(str, "could not get x"))
60
.ok_or(Error::Decode("could not get x".into()))??;
61
let y = nums
62
- .get(1)
+ .last()
63
.map(|str| parse_float_from_str(str, "could not get y"))
64
.ok_or(Error::Decode("could not get y".into()))??;
65
0 commit comments