mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-22 21:30:44 +02:00
chore: apply clippy suggestions (#256)
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
use auto_launch::{AutoLaunch, AutoLaunchBuilder};
|
use auto_launch::{AutoLaunch, AutoLaunchBuilder};
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
use log::info;
|
use log::info;
|
||||||
use serde::{ser::Serializer, Serialize};
|
use serde::{ser::Serializer, Serialize};
|
||||||
use tauri::{
|
use tauri::{
|
||||||
@@ -119,11 +120,7 @@ pub fn init<R: Runtime>(
|
|||||||
let exe_path = current_exe.canonicalize()?.display().to_string();
|
let exe_path = current_exe.canonicalize()?.display().to_string();
|
||||||
let parts: Vec<&str> = exe_path.split(".app/").collect();
|
let parts: Vec<&str> = exe_path.split(".app/").collect();
|
||||||
let app_path = if parts.len() == 2 {
|
let app_path = if parts.len() == 2 {
|
||||||
format!(
|
format!("{}.app", parts.get(0).unwrap().to_string())
|
||||||
"{}{}",
|
|
||||||
parts.get(0).unwrap().to_string(),
|
|
||||||
".app"
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
exe_path
|
exe_path
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ async fn download<R: Runtime>(
|
|||||||
|
|
||||||
let response = request.send().await?;
|
let response = request.send().await?;
|
||||||
let total = response.content_length().ok_or_else(|| {
|
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?;
|
let mut file = File::create(file_path).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user