Skip to content

Commit 7e608d9

Browse files
committed
chore: clippy fixes
1 parent 0434c6f commit 7e608d9

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;
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

@@ -140,7 +141,12 @@ async fn main() -> anyhow::Result<()> {
140141
.start();
141142

142143
match config.transport {
143-
Transport::StreamableHttp { proxy, proxy_url, address, port } => {
144+
Transport::StreamableHttp {
145+
proxy,
146+
proxy_url,
147+
address,
148+
port,
149+
} => {
144150
if proxy {
145151
let url = Transport::proxy_url(&proxy_url, &address, &port);
146152
let proxy_client = async {
@@ -157,7 +163,9 @@ async fn main() -> anyhow::Result<()> {
157163
mcp_server.await?;
158164
}
159165
}
160-
_ => { mcp_server.await?; }
166+
_ => {
167+
mcp_server.await?;
168+
}
161169
}
162170

163171
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;
@@ -102,14 +102,13 @@ impl Transport {
102102

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

0 commit comments

Comments
 (0)