chore: apply clippy suggestions (#256)

pull/257/head
Fabian-Lars 2 years ago committed by GitHub
parent e203b4f68f
commit 92d9f2754c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT
use auto_launch::{AutoLaunch, AutoLaunchBuilder};
#[cfg(target_os = "macos")]
use log::info;
use serde::{ser::Serializer, Serialize};
use tauri::{
@ -119,11 +120,7 @@ pub fn init<R: Runtime>(
let exe_path = current_exe.canonicalize()?.display().to_string();
let parts: Vec<&str> = exe_path.split(".app/").collect();
let app_path = if parts.len() == 2 {
format!(
"{}{}",
parts.get(0).unwrap().to_string(),
".app"
)
format!("{}.app", parts.get(0).unwrap().to_string())
} else {
exe_path
};

@ -63,7 +63,7 @@ async fn download<R: Runtime>(
let response = request.send().await?;
let total = response.content_length().ok_or_else(|| {
Error::ContentLength(format!("Failed to get content length from '{}'", url))
Error::ContentLength(format!("Failed to get content length from '{url}'"))
})?;
let mut file = File::create(file_path).await?;

Loading…
Cancel
Save