rrgeo
rrgeo copied to clipboard
Error thrown when cargo compile reverse_geocoder
Hi, I added the library as explained in the example:
fn get_country_by_coordinates(p: Point) -> Country {
let geocoder = ReverseGeocoder::new();
let coords = (40.7831, -73.9712);
let search_result = geocoder.search(coords);
println!("Distance {}", search_result.distance);
println!("Record {}", search_result.record);
let country = Country {
id: 1,
alpha2: String::from(""),
alpha3: String::from(""),
name: String::from(""),
};
return country;
}
But when I ran cargo run
it threw an error:
PS C:\Users\andre\Repositories\automato-api> cargo run
Compiling reverse_geocoder v4.1.1
error[E0658]: use of unstable library feature 'io_error_other'
--> C:\Users\andre\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reverse_geocoder-4.1.1\src/reverse_geocoder.rs:120:24
|
120 | ... return Err(std::io::Error::other("Need one or more records"));
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #91946 <https://github.com/rust-lang/rust/issues/91946> for more information
For more information about this error, try `rustc --explain E0658`.
error: could not compile `reverse_geocoder` (lib) due to previous error
Do you have any advice on this?