Skip to content

Commit 8858671

Browse files
committed
fix: clippy
1 parent 7ca257e commit 8858671

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlx-postgres/src/types/point.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ impl FromStr for PgPoint {
5555
let nums = sanitised.split(',').collect::<Vec<&str>>();
5656

5757
let x = nums
58-
.get(0)
58+
.first()
5959
.map(|str| parse_float_from_str(str, "could not get x"))
6060
.ok_or(Error::Decode("could not get x".into()))??;
6161
let y = nums
62-
.get(1)
62+
.last()
6363
.map(|str| parse_float_from_str(str, "could not get y"))
6464
.ok_or(Error::Decode("could not get y".into()))??;
6565

0 commit comments

Comments
 (0)