[clippy] fix clippy issues

This commit is contained in:
2025-06-25 21:18:36 +02:00
parent 8fda4f79ed
commit ffb05e3a0a
3 changed files with 3 additions and 12 deletions

View File

@ -312,7 +312,7 @@ pub async fn run(
let (mut rx, mut tx) = stream.split(); let (mut rx, mut tx) = stream.split();
if let Err(e) = tx.send(data).await { if let Err(e) = tx.send(data).await {
log::error!("failed to send request to server {:?}", e); log::error!("failed to send request to server {e:?}");
} }
let mut data = BytesMut::new(); let mut data = BytesMut::new();

View File

@ -11,10 +11,7 @@ use gethostname::gethostname;
use lanspread_compat::eti; use lanspread_compat::eti;
use lanspread_db::db::{Game, GameDB}; use lanspread_db::db::{Game, GameDB};
use lanspread_mdns::{ use lanspread_mdns::{
DaemonEvent, DaemonEvent, LANSPREAD_INSTANCE_NAME, LANSPREAD_SERVICE_TYPE, MdnsAdvertiser,
LANSPREAD_INSTANCE_NAME,
LANSPREAD_SERVICE_TYPE,
MdnsAdvertiser,
}; };
use tracing_subscriber::EnvFilter; use tracing_subscriber::EnvFilter;
use uuid::Uuid; use uuid::Uuid;
@ -57,7 +54,6 @@ fn spawn_mdns_task(server_addr: SocketAddr) -> eyre::Result<()> {
if let DaemonEvent::Error(e) = event { if let DaemonEvent::Error(e) = event {
tracing::error!("mDNS: {e}"); tracing::error!("mDNS: {e}");
tokio::time::sleep(Duration::from_secs(1)).await; tokio::time::sleep(Duration::from_secs(1)).await;
continue;
} }
} }
}); });

View File

@ -171,10 +171,5 @@ fn get_relative_path(base: &Path, deep_path: &Path) -> std::io::Result<PathBuf>
full_canonical full_canonical
.strip_prefix(&base_canonical) .strip_prefix(&base_canonical)
.map(std::path::Path::to_path_buf) .map(std::path::Path::to_path_buf)
.map_err(|_| { .map_err(|_| std::io::Error::other("Path is not within base directory"))
std::io::Error::new(
std::io::ErrorKind::Other,
"Path is not within base directory",
)
})
} }