From c3ba84d8ccd38ef19ff62dcd127565a57a8404f3 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Thu, 23 Apr 2026 19:40:03 -0400 Subject: [PATCH] fix(server): clear clippy warnings in server tests Return `&'static str` from the mock provider's `name()` and drop redundant `.to_string()` calls on `github.base_url()` (already owned). Co-Authored-By: Claude Opus 4.7 (1M context) --- lib/crates/fabro-server/src/server.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/crates/fabro-server/src/server.rs b/lib/crates/fabro-server/src/server.rs index 52dc81238..c096d5084 100644 --- a/lib/crates/fabro-server/src/server.rs +++ b/lib/crates/fabro-server/src/server.rs @@ -8726,7 +8726,7 @@ strategy = "token" #[async_trait::async_trait] impl ProviderAdapter for MockLlmProvider { - fn name(&self) -> &str { + fn name(&self) -> &'static str { "anthropic" } @@ -9457,8 +9457,7 @@ slug = "fabro" .to_string(), ); }); - let state = - create_github_token_app_state(Some("ghu_test"), Some(github.base_url().to_string())); + let state = create_github_token_app_state(Some("ghu_test"), Some(github.base_url())); let app = build_router(Arc::clone(&state), AuthMode::Disabled); let run_id = fixtures::RUN_1; @@ -9584,8 +9583,7 @@ slug = "fabro" .header("content-type", "application/json") .body(json!({ "message": "Not Found" }).to_string()); }); - let state = - create_github_token_app_state(Some("ghu_test"), Some(github.base_url().to_string())); + let state = create_github_token_app_state(Some("ghu_test"), Some(github.base_url())); let app = build_router(Arc::clone(&state), AuthMode::Disabled); let run_id = fixtures::RUN_1; @@ -9642,8 +9640,7 @@ slug = "fabro" .to_string(), ); }); - let state = - create_github_token_app_state(Some("ghu_test"), Some(github.base_url().to_string())); + let state = create_github_token_app_state(Some("ghu_test"), Some(github.base_url())); let app = build_router(Arc::clone(&state), AuthMode::Disabled); let run_id = fixtures::RUN_1;