Skip to content

Commit 6c47daa

Browse files
committed
chore: clippy fixes
1 parent 5ab73d0 commit 6c47daa

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

crates/apollo-mcp-proxy/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use clap::Parser;
21
use apollo_mcp_proxy::client::start_proxy_client;
2+
use clap::Parser;
33
use std::error::Error;
44
use tracing_appender::rolling::{RollingFileAppender, Rotation};
55
use tracing_subscriber::layer::SubscriberExt;

crates/apollo-mcp-proxy/src/server.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ impl ServerHandler for ProxyServer {
262262
}
263263
Err(err) => {
264264
error!("[Proxy] Error calling tool: {:?}", err);
265-
Ok(CallToolResult::error(vec![Content::text(format!("Error: {err}"))]))
265+
Ok(CallToolResult::error(vec![Content::text(format!(
266+
"Error: {err}"
267+
))]))
266268
}
267269
}
268270
}

crates/apollo-mcp-server/src/main.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::path::PathBuf;
22

3+
use apollo_mcp_proxy::client::start_proxy_client;
34
use apollo_mcp_registry::platform_api::operation_collections::collection_poller::CollectionSource;
45
use apollo_mcp_registry::uplink::persisted_queries::ManifestSource;
56
use apollo_mcp_registry::uplink::schema::SchemaSource;
@@ -11,11 +12,10 @@ use apollo_mcp_server::server::Transport;
1112
use clap::Parser;
1213
use clap::builder::Styles;
1314
use clap::builder::styling::{AnsiColor, Effects};
14-
use tokio::signal;
1515
use runtime::IdOrDefault;
16+
use tokio::signal;
1617
use tracing::{Level, info, warn};
1718
use tracing_subscriber::EnvFilter;
18-
use apollo_mcp_proxy::client::start_proxy_client;
1919

2020
mod runtime;
2121

@@ -160,7 +160,12 @@ async fn main() -> anyhow::Result<()> {
160160
.start();
161161

162162
match config.transport {
163-
Transport::StreamableHttp { proxy, proxy_url, address, port } => {
163+
Transport::StreamableHttp {
164+
proxy,
165+
proxy_url,
166+
address,
167+
port,
168+
} => {
164169
if proxy {
165170
let url = Transport::proxy_url(&proxy_url, &address, &port);
166171
let proxy_client = async {
@@ -177,7 +182,9 @@ async fn main() -> anyhow::Result<()> {
177182
mcp_server.await?;
178183
}
179184
}
180-
_ => { mcp_server.await?; }
185+
_ => {
186+
mcp_server.await?;
187+
}
181188
}
182189

183190
Ok(())

crates/apollo-mcp-server/src/server.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bon::bon;
55
use reqwest::header::{CONTENT_TYPE, HeaderMap, HeaderValue};
66
use schemars::JsonSchema;
77
use serde::Deserialize;
8-
use url::{Url};
8+
use url::Url;
99

1010
use crate::custom_scalar_map::CustomScalarMap;
1111
use crate::errors::ServerError;
@@ -91,14 +91,13 @@ impl Transport {
9191

9292
pub fn proxy_url(proxy_url: &Option<Url>, address: &IpAddr, port: &u16) -> Url {
9393
match proxy_url {
94-
Some(proxy_url) => { proxy_url.clone() }
94+
Some(proxy_url) => proxy_url.clone(),
9595
None => {
9696
let address = format!("http://{address}:{port}/mcp");
9797
#[allow(clippy::unwrap_used)]
9898
Url::parse(address.as_str()).unwrap()
9999
}
100100
}
101-
102101
}
103102
}
104103

0 commit comments

Comments
 (0)