Skip to content

Commit b685dea

Browse files
committed
chore: clippy fixes
1 parent 8b0ccde commit b685dea

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-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: 12 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;
@@ -10,11 +11,11 @@ use apollo_mcp_server::server::{Server, Transport};
1011
use clap::Parser;
1112
use clap::builder::Styles;
1213
use clap::builder::styling::{AnsiColor, Effects};
13-
use tokio::signal;
1414
use runtime::IdOrDefault;
1515
use runtime::logging::Logging;
1616
use tracing::{info, warn};
17-
use apollo_mcp_proxy::client::start_proxy_client;
17+
use tokio::signal;
18+
use tracing_subscriber::EnvFilter;
1819

1920
mod runtime;
2021

@@ -151,7 +152,12 @@ async fn main() -> anyhow::Result<()> {
151152
.start();
152153

153154
match config.transport {
154-
Transport::StreamableHttp { proxy, proxy_url, address, port } => {
155+
Transport::StreamableHttp {
156+
proxy,
157+
proxy_url,
158+
address,
159+
port,
160+
} => {
155161
if proxy {
156162
let url = Transport::proxy_url(&proxy_url, &address, &port);
157163
let proxy_client = async {
@@ -168,7 +174,9 @@ async fn main() -> anyhow::Result<()> {
168174
mcp_server.await?;
169175
}
170176
}
171-
_ => { mcp_server.await?; }
177+
_ => {
178+
mcp_server.await?;
179+
}
172180
}
173181

174182
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::auth;
1111
use crate::custom_scalar_map::CustomScalarMap;
@@ -103,14 +103,13 @@ impl Transport {
103103

104104
pub fn proxy_url(proxy_url: &Option<Url>, address: &IpAddr, port: &u16) -> Url {
105105
match proxy_url {
106-
Some(proxy_url) => { proxy_url.clone() }
106+
Some(proxy_url) => proxy_url.clone(),
107107
None => {
108108
let address = format!("http://{address}:{port}/mcp");
109109
#[allow(clippy::unwrap_used)]
110110
Url::parse(address.as_str()).unwrap()
111111
}
112112
}
113-
114113
}
115114
}
116115

0 commit comments

Comments
 (0)