From 7d410d53274fdd6840261c286bc2785222256436 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 18 Mar 2024 10:46:39 +0100 Subject: clippy --- client-native-rift/src/file.rs | 6 ++---- client-native-rift/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'client-native-rift/src') diff --git a/client-native-rift/src/file.rs b/client-native-rift/src/file.rs index 93dde62..a988595 100644 --- a/client-native-rift/src/file.rs +++ b/client-native-rift/src/file.rs @@ -126,11 +126,10 @@ impl RequestHandler for DownloadHandler { .label .clone() .unwrap_or("download".to_owned()) - .replace("/", "_") + .replace('/', "_") .replace("..", "_") .into() }); - if path.exists() {} Box::pin(async move { let pos = Arc::new(AtomicUsize::new(0)); let writer: Arc>>>> = @@ -178,9 +177,8 @@ impl RequestHandler for DownloadHandler { let writer = writer.clone(); let pos = pos.clone(); Box::pin(async move { - // TODO if mesg.is_string { - let s = String::from_utf8((&mesg.data).to_vec()).unwrap(); + let s = String::from_utf8(mesg.data.to_vec()).unwrap(); if &s == "end" { info!("transfer complete") } diff --git a/client-native-rift/src/main.rs b/client-native-rift/src/main.rs index fad4bb7..40b9aab 100644 --- a/client-native-rift/src/main.rs +++ b/client-native-rift/src/main.rs @@ -3,7 +3,7 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2023 metamuffin */ - +#![allow(clippy::type_complexity)] pub mod file; pub mod port; -- cgit v1.2.3-70-g09d2