Compare commits

...

1 Commits

Author SHA1 Message Date
FabianLars 14381190e7 chore: Apply clippy suggestions 2025-07-23 12:44:36 +02:00
5 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -14,11 +14,11 @@ pub struct RequestBody {
#[command]
pub fn log_operation(event: String, payload: Option<String>) {
log::info!("{} {:?}", event, payload);
log::info!("{event} {payload:?}");
}
#[command]
pub fn perform_request(endpoint: String, body: RequestBody) -> String {
println!("{} {:?}", endpoint, body);
println!("{endpoint} {body:?}");
"message response".into()
}
+1 -1
View File
@@ -95,7 +95,7 @@ pub fn run() {
let server = match tiny_http::Server::http("localhost:3003") {
Ok(s) => s,
Err(e) => {
eprintln!("{}", e);
eprintln!("{e}");
std::process::exit(1);
}
};
+1 -1
View File
@@ -30,7 +30,7 @@ fn set_cookies(
fn cookies(cookie_store: &CookieStore, url: &url::Url) -> Option<HeaderValue> {
let s = cookie_store
.get_request_values(url)
.map(|(name, value)| format!("{}={}", name, value))
.map(|(name, value)| format!("{name}={value}"))
.collect::<Vec<_>>()
.join("; ");
+1 -1
View File
@@ -52,7 +52,7 @@ impl<'de> Deserialize<'de> for Entry {
};
Ok(Entry {
url: parse_url_pattern(&url).map_err(|e| {
serde::de::Error::custom(format!("`{}` is not a valid URL pattern: {e}", url))
serde::de::Error::custom(format!("`{url}` is not a valid URL pattern: {e}"))
})?,
})
})
@@ -29,7 +29,7 @@ async fn accept_connection(stream: TcpStream) {
let (write, read) = ws_stream.split();
if let Err(e) = read.forward(write).await {
eprintln!("Error: {}", e);
eprintln!("Error: {e}");
}
}