Skip to content

Commit f62942a

Browse files
committed
chore: clippy fixes
1 parent 9f7d413 commit f62942a

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

@@ -162,7 +162,12 @@ async fn main() -> anyhow::Result<()> {
162162
.start();
163163

164164
match config.transport {
165-
Transport::StreamableHttp { proxy, proxy_url, address, port } => {
165+
Transport::StreamableHttp {
166+
proxy,
167+
proxy_url,
168+
address,
169+
port,
170+
} => {
166171
if proxy {
167172
let url = Transport::proxy_url(&proxy_url, &address, &port);
168173
let proxy_client = async {
@@ -179,7 +184,9 @@ async fn main() -> anyhow::Result<()> {
179184
mcp_server.await?;
180185
}
181186
}
182-
_ => { mcp_server.await?; }
187+
_ => {
188+
mcp_server.await?;
189+
}
183190
}
184191

185192
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;
@@ -93,14 +93,13 @@ impl Transport {
9393

9494
pub fn proxy_url(proxy_url: &Option<Url>, address: &IpAddr, port: &u16) -> Url {
9595
match proxy_url {
96-
Some(proxy_url) => { proxy_url.clone() }
96+
Some(proxy_url) => proxy_url.clone(),
9797
None => {
9898
let address = format!("http://{address}:{port}/mcp");
9999
#[allow(clippy::unwrap_used)]
100100
Url::parse(address.as_str()).unwrap()
101101
}
102102
}
103-
104103
}
105104
}
106105

0 commit comments

Comments
 (0)