[clippy] fix clippy issues
This commit is contained in:
@ -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();
|
||||||
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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",
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user