fix: syntax issues

This commit is contained in:
huzibaca 2024-12-31 04:50:12 +08:00
parent 44d1ec433d
commit 04d766884a
5 changed files with 6 additions and 7 deletions

View File

@ -173,7 +173,7 @@ impl WebDavClient {
Ok::<Vec<ListFile>, Error>(final_files) Ok::<Vec<ListFile>, Error>(final_files)
}; };
Ok(timeout(Duration::from_secs(TIMEOUT_LIST), fut).await??) timeout(Duration::from_secs(TIMEOUT_LIST), fut).await?
} }
pub async fn delete(&self, file_name: String) -> Result<(), Error> { pub async fn delete(&self, file_name: String) -> Result<(), Error> {

View File

@ -66,7 +66,7 @@ impl SpeedRate {
// 修改颜色和阴影参数 // 修改颜色和阴影参数
let text_color = Rgba([255u8, 255u8, 255u8, 255u8]); // 纯白色 let text_color = Rgba([255u8, 255u8, 255u8, 255u8]); // 纯白色
let shadow_color = Rgba([0u8, 0u8, 0u8, 180u8]); // 半透明黑色阴影 let shadow_color = Rgba([0u8, 0u8, 0u8, 180u8]); // 半透明黑色阴影
let base_size = (height as f32 * 0.5) as f32; let base_size = height as f32 * 0.5;
let scale = Scale::uniform(base_size); let scale = Scale::uniform(base_size);
let up_text = format_bytes_speed(rate.up); let up_text = format_bytes_speed(rate.up);

View File

@ -475,9 +475,9 @@ pub async fn restore_webdav_backup(filename: String) -> Result<()> {
log_err!( log_err!(
patch_verge(IVerge { patch_verge(IVerge {
webdav_url: webdav_url, webdav_url,
webdav_username: webdav_username, webdav_username,
webdav_password: webdav_password, webdav_password,
..IVerge::default() ..IVerge::default()
}) })
.await .await

View File

@ -135,7 +135,6 @@ pub fn run() {
tauri::RunEvent::ExitRequested { api, code, .. } => { tauri::RunEvent::ExitRequested { api, code, .. } => {
if code.is_none() { if code.is_none() {
api.prevent_exit(); api.prevent_exit();
return;
} }
} }
tauri::RunEvent::WindowEvent { label, event, .. } => { tauri::RunEvent::WindowEvent { label, event, .. } => {

View File

@ -99,7 +99,7 @@ pub fn get_last_part_and_decode(url: &str) -> Option<String> {
/// open file /// open file
pub fn open_file(_: tauri::AppHandle, path: PathBuf) -> Result<()> { pub fn open_file(_: tauri::AppHandle, path: PathBuf) -> Result<()> {
open::that_detached(&path.as_os_str())?; open::that_detached(path.as_os_str())?;
Ok(()) Ok(())
} }