diff --git a/Cargo.toml b/Cargo.toml index 26bde051..59fb8ffb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = ["martin", "martin-tile-utils", "mbtiles"] edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/maplibre/martin" -rust-version = "1.70" +rust-version = "1.74" readme = "README.md" homepage = "https://martin.maplibre.org/" diff --git a/martin/src/mbtiles/mod.rs b/martin/src/mbtiles/mod.rs index 3029fed0..d9ea2dfc 100644 --- a/martin/src/mbtiles/mod.rs +++ b/martin/src/mbtiles/mod.rs @@ -63,12 +63,7 @@ impl MbtSource { async fn new(id: String, path: PathBuf) -> FileResult { let mbt = MbtilesPool::new(&path) .await - .map_err(|e| { - io::Error::new( - io::ErrorKind::Other, - format!("{e:?}: Cannot open file {}", path.display()), - ) - }) + .map_err(|e| io::Error::other(format!("{e:?}: Cannot open file {}", path.display()))) .map_err(|e| IoError(e, path.clone()))?; let meta = mbt diff --git a/martin/src/pmtiles/mod.rs b/martin/src/pmtiles/mod.rs index 3a9ddf0d..b24389a3 100644 --- a/martin/src/pmtiles/mod.rs +++ b/martin/src/pmtiles/mod.rs @@ -313,22 +313,12 @@ impl PmtFileSource { pub async fn new(cache: PmtCache, id: String, path: PathBuf) -> FileResult { let backend = MmapBackend::try_from(path.as_path()) .await - .map_err(|e| { - io::Error::new( - io::ErrorKind::Other, - format!("{e:?}: Cannot open file {}", path.display()), - ) - }) + .map_err(|e| io::Error::other(format!("{e:?}: Cannot open file {}", path.display()))) .map_err(|e| IoError(e, path.clone()))?; let reader = AsyncPmTilesReader::try_from_cached_source(backend, cache).await; let reader = reader - .map_err(|e| { - io::Error::new( - io::ErrorKind::Other, - format!("{e:?}: Cannot open file {}", path.display()), - ) - }) + .map_err(|e| io::Error::other(format!("{e:?}: Cannot open file {}", path.display()))) .map_err(|e| IoError(e, path.clone()))?; Self::new_int(id, path, reader).await