From d98edb97743a6e003c5a7685b15f1d3e508a629e Mon Sep 17 00:00:00 2001 From: FabianLars Date: Tue, 3 Dec 2024 13:50:19 +0100 Subject: [PATCH] fix compilation --- plugins/fs/src/file_path.rs | 4 ++-- plugins/os/src/lib.rs | 2 +- plugins/shell/src/scope.rs | 2 +- plugins/stronghold/src/lib.rs | 2 +- plugins/upload/src/lib.rs | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/fs/src/file_path.rs b/plugins/fs/src/file_path.rs index 9ff7a947..735fc105 100644 --- a/plugins/fs/src/file_path.rs +++ b/plugins/fs/src/file_path.rs @@ -138,7 +138,7 @@ impl<'de> serde::Deserialize<'de> for FilePath { { struct FilePathVisitor; - impl<'de> serde::de::Visitor<'de> for FilePathVisitor { + impl serde::de::Visitor<'_> for FilePathVisitor { type Value = FilePath; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -169,7 +169,7 @@ impl<'de> serde::Deserialize<'de> for SafeFilePath { { struct SafeFilePathVisitor; - impl<'de> serde::de::Visitor<'de> for SafeFilePathVisitor { + impl serde::de::Visitor<'_> for SafeFilePathVisitor { type Value = SafeFilePath; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/plugins/os/src/lib.rs b/plugins/os/src/lib.rs index 913d1742..c041c8ea 100644 --- a/plugins/os/src/lib.rs +++ b/plugins/os/src/lib.rs @@ -110,7 +110,7 @@ struct InitJavascript<'a> { exe_extension: &'a str, } -impl<'a> InitJavascript<'a> { +impl InitJavascript<'_> { fn new() -> Self { Self { #[cfg(windows)] diff --git a/plugins/shell/src/scope.rs b/plugins/shell/src/scope.rs index 9e76931a..d46bfa20 100644 --- a/plugins/shell/src/scope.rs +++ b/plugins/shell/src/scope.rs @@ -224,7 +224,7 @@ impl OpenScope { } } -impl<'a> ShellScope<'a> { +impl ShellScope<'_> { /// Validates argument inputs and creates a Tauri sidecar [`Command`]. pub fn prepare_sidecar( &self, diff --git a/plugins/stronghold/src/lib.rs b/plugins/stronghold/src/lib.rs index 3454a662..23acc3a2 100644 --- a/plugins/stronghold/src/lib.rs +++ b/plugins/stronghold/src/lib.rs @@ -125,7 +125,7 @@ impl<'de> Deserialize<'de> for KeyType { { struct KeyTypeVisitor; - impl<'de> Visitor<'de> for KeyTypeVisitor { + impl Visitor<'_> for KeyTypeVisitor { type Value = KeyType; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/plugins/upload/src/lib.rs b/plugins/upload/src/lib.rs index 7945ed8e..23c33b11 100644 --- a/plugins/upload/src/lib.rs +++ b/plugins/upload/src/lib.rs @@ -69,11 +69,11 @@ async fn download( url: &str, file_path: &str, headers: HashMap, - on_progress: Channel, body: Option, + on_progress: Channel, ) -> Result<()> { let client = reqwest::Client::new(); - if let Some(body) = body { + let mut request = if let Some(body) = body { client.post(url).body(body) } else { client.get(url) @@ -210,7 +210,7 @@ mod tests { let _ = msg; Ok(()) }); - download(url, file_path, headers, sender).await + download(url, file_path, headers, None, sender).await } async fn spawn_server_mocked(return_status: usize) -> MockedServer {