1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-11 00:30:16 +02:00

Correct a minor mistake in the code in lifetime-elision.md (#2814)

This commit is contained in:
Jason Lin
2025-07-10 23:12:46 +10:00
committed by GitHub
parent 7eecb9bb77
commit 0f41f32be1

View File

@ -42,7 +42,7 @@ fn main() {
let points = &[Point(1, 0), Point(1, 0), Point(-1, 0), Point(0, -1)];
let nearest = {
let query = Point(0, 2);
find_nearest(points, &Point(0, 2))
find_nearest(points, &query)
};
println!("{:?}", nearest);
}