Skip to content

Commit 45c1691

Browse files
committed
chore: clippy fixes
1 parent 8f8f776 commit 45c1691

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

@@ -155,7 +155,12 @@ async fn main() -> anyhow::Result<()> {
155155
.start();
156156

157157
match config.transport {
158-
Transport::StreamableHttp { proxy, proxy_url, address, port } => {
158+
Transport::StreamableHttp {
159+
proxy,
160+
proxy_url,
161+
address,
162+
port,
163+
} => {
159164
if proxy {
160165
let url = Transport::proxy_url(&proxy_url, &address, &port);
161166
let proxy_client = async {
@@ -172,7 +177,9 @@ async fn main() -> anyhow::Result<()> {
172177
mcp_server.await?;
173178
}
174179
}
175-
_ => { mcp_server.await?; }
180+
_ => {
181+
mcp_server.await?;
182+
}
176183
}
177184

178185
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;
@@ -86,14 +86,13 @@ impl Transport {
8686

8787
pub fn proxy_url(proxy_url: &Option<Url>, address: &IpAddr, port: &u16) -> Url {
8888
match proxy_url {
89-
Some(proxy_url) => { proxy_url.clone() }
89+
Some(proxy_url) => proxy_url.clone(),
9090
None => {
9191
let address = format!("http://{address}:{port}/mcp");
9292
#[allow(clippy::unwrap_used)]
9393
Url::parse(address.as_str()).unwrap()
9494
}
9595
}
96-
9796
}
9897
}
9998

0 commit comments

Comments
 (0)