fix compilation

pull/1523/head
FabianLars 8 months ago
parent 3c1a7314d0
commit d98edb9774
No known key found for this signature in database

@ -138,7 +138,7 @@ impl<'de> serde::Deserialize<'de> for FilePath {
{ {
struct FilePathVisitor; struct FilePathVisitor;
impl<'de> serde::de::Visitor<'de> for FilePathVisitor { impl serde::de::Visitor<'_> for FilePathVisitor {
type Value = FilePath; type Value = FilePath;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
@ -169,7 +169,7 @@ impl<'de> serde::Deserialize<'de> for SafeFilePath {
{ {
struct SafeFilePathVisitor; struct SafeFilePathVisitor;
impl<'de> serde::de::Visitor<'de> for SafeFilePathVisitor { impl serde::de::Visitor<'_> for SafeFilePathVisitor {
type Value = SafeFilePath; type Value = SafeFilePath;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {

@ -110,7 +110,7 @@ struct InitJavascript<'a> {
exe_extension: &'a str, exe_extension: &'a str,
} }
impl<'a> InitJavascript<'a> { impl InitJavascript<'_> {
fn new() -> Self { fn new() -> Self {
Self { Self {
#[cfg(windows)] #[cfg(windows)]

@ -224,7 +224,7 @@ impl OpenScope {
} }
} }
impl<'a> ShellScope<'a> { impl ShellScope<'_> {
/// Validates argument inputs and creates a Tauri sidecar [`Command`]. /// Validates argument inputs and creates a Tauri sidecar [`Command`].
pub fn prepare_sidecar( pub fn prepare_sidecar(
&self, &self,

@ -125,7 +125,7 @@ impl<'de> Deserialize<'de> for KeyType {
{ {
struct KeyTypeVisitor; struct KeyTypeVisitor;
impl<'de> Visitor<'de> for KeyTypeVisitor { impl Visitor<'_> for KeyTypeVisitor {
type Value = KeyType; type Value = KeyType;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {

@ -69,11 +69,11 @@ async fn download(
url: &str, url: &str,
file_path: &str, file_path: &str,
headers: HashMap<String, String>, headers: HashMap<String, String>,
on_progress: Channel<ProgressPayload>,
body: Option<String>, body: Option<String>,
on_progress: Channel<ProgressPayload>,
) -> Result<()> { ) -> Result<()> {
let client = reqwest::Client::new(); let client = reqwest::Client::new();
if let Some(body) = body { let mut request = if let Some(body) = body {
client.post(url).body(body) client.post(url).body(body)
} else { } else {
client.get(url) client.get(url)
@ -210,7 +210,7 @@ mod tests {
let _ = msg; let _ = msg;
Ok(()) 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 { async fn spawn_server_mocked(return_status: usize) -> MockedServer {

Loading…
Cancel
Save