From 2e8b6a2ab2fc7a793f406f4f45b5dcfcbc181fbe Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 21 May 2025 14:14:44 -0400 Subject: [PATCH 1/3] chore: fix clippy 1.87 --- martin/build.rs | 2 +- martin/src/bin/martin-cp.rs | 2 +- martin/src/srv/styles.rs | 2 +- martin/src/styles/mod.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/martin/build.rs b/martin/build.rs index 235ca0f5c..b463a8c93 100644 --- a/martin/build.rs +++ b/martin/build.rs @@ -78,7 +78,7 @@ fn webui() { &["dist", "node_modules"], ); - println!("installing and building in {out_martin_ui_dir:?}"); + println!("installing and building in {}", out_martin_ui_dir.display()); static_files::NpmBuild::new(&out_martin_ui_dir) .install() .expect("npm install failed") diff --git a/martin/src/bin/martin-cp.rs b/martin/src/bin/martin-cp.rs index 91b030758..e739386a7 100644 --- a/martin/src/bin/martin-cp.rs +++ b/martin/src/bin/martin-cp.rs @@ -187,7 +187,7 @@ fn compute_tile_ranges(args: &CopyArgs) -> Vec { ranges } -fn get_zooms(args: &CopyArgs) -> Cow> { +fn get_zooms(args: &CopyArgs) -> Cow<[u8]> { if let Some(max_zoom) = args.max_zoom { let mut zooms_vec = Vec::new(); let min_zoom = args.min_zoom.unwrap_or(0); diff --git a/martin/src/srv/styles.rs b/martin/src/srv/styles.rs index 0db7f9908..7b1f8e2e1 100644 --- a/martin/src/srv/styles.rs +++ b/martin/src/srv/styles.rs @@ -33,7 +33,7 @@ async fn get_style_json(path: Path, styles: Data) -> match serde_json::from_str::(&style_content) { Ok(value) => HttpResponse::Ok().json(value), Err(e) => { - error!("Failed to parse style JSON {e:?} for style {style_id} at {path:?}"); + error!("Failed to parse style JSON {e:?} for style {style_id} at {:?}", path.display()); HttpResponse::BadRequest() .content_type(ContentType::plaintext()) diff --git a/martin/src/styles/mod.rs b/martin/src/styles/mod.rs index 132fa43e3..4b6c80bce 100644 --- a/martin/src/styles/mod.rs +++ b/martin/src/styles/mod.rs @@ -63,12 +63,12 @@ impl StyleSources { for base_path in cfg.paths { let files = list_contained_files(&base_path, "json")?; if files.is_empty() { - warn!("No styles (.json files) found in path {base_path:?}"); + warn!("No styles (.json files) found in path {:?}", base_path.display()); continue; } for path in files { let Some(name) = path.file_name() else { - warn!("Ignoring style source with no name from {path:?}"); + warn!("Ignoring style source with no name from {:?}", path.display()); continue; }; let style_id = name From 460ec37f6bacf0dd842a1137bbd7a59b95748da3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 18:15:13 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- martin/src/srv/styles.rs | 5 ++++- martin/src/styles/mod.rs | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/martin/src/srv/styles.rs b/martin/src/srv/styles.rs index 7b1f8e2e1..6e32c2cde 100644 --- a/martin/src/srv/styles.rs +++ b/martin/src/srv/styles.rs @@ -33,7 +33,10 @@ async fn get_style_json(path: Path, styles: Data) -> match serde_json::from_str::(&style_content) { Ok(value) => HttpResponse::Ok().json(value), Err(e) => { - error!("Failed to parse style JSON {e:?} for style {style_id} at {:?}", path.display()); + error!( + "Failed to parse style JSON {e:?} for style {style_id} at {:?}", + path.display() + ); HttpResponse::BadRequest() .content_type(ContentType::plaintext()) diff --git a/martin/src/styles/mod.rs b/martin/src/styles/mod.rs index 4b6c80bce..9cc0b9f90 100644 --- a/martin/src/styles/mod.rs +++ b/martin/src/styles/mod.rs @@ -63,12 +63,18 @@ impl StyleSources { for base_path in cfg.paths { let files = list_contained_files(&base_path, "json")?; if files.is_empty() { - warn!("No styles (.json files) found in path {:?}", base_path.display()); + warn!( + "No styles (.json files) found in path {:?}", + base_path.display() + ); continue; } for path in files { let Some(name) = path.file_name() else { - warn!("Ignoring style source with no name from {:?}", path.display()); + warn!( + "Ignoring style source with no name from {:?}", + path.display() + ); continue; }; let style_id = name From de7275d0d143f2e3b8a136aa6d9a6f59a4b4bc09 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 21 May 2025 14:48:53 -0400 Subject: [PATCH 3/3] wait a bit longer for timeouts --- .github/files/markdown.links.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/files/markdown.links.config.json b/.github/files/markdown.links.config.json index eaff6f07c..f89e0570a 100644 --- a/.github/files/markdown.links.config.json +++ b/.github/files/markdown.links.config.json @@ -6,7 +6,7 @@ "replacement": "" } ], - "timeout": "2s", + "timeout": "3s", "retryOn429": true, "ignorePatterns": [ {