mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
chore: fix some clippy warnings
This commit is contained in:
@@ -2875,8 +2875,6 @@ fn handle_gl_loop(
|
||||
windows,
|
||||
window_event_listeners,
|
||||
menu_event_listeners,
|
||||
#[cfg(feature = "system-tray")]
|
||||
tray_context,
|
||||
..
|
||||
} = context;
|
||||
let egui_id = EGUI_ID.lock().unwrap();
|
||||
|
||||
@@ -37,7 +37,7 @@ fn register_shortcut<R: Runtime>(
|
||||
) -> crate::Result<()> {
|
||||
let accelerator = shortcut.clone();
|
||||
manager.register(&shortcut, move || {
|
||||
let callback_string = crate::api::rpc::format_callback(handler.to_string(), &accelerator)
|
||||
let callback_string = crate::api::rpc::format_callback(&handler, &accelerator)
|
||||
.expect("unable to serialize shortcut string to json");
|
||||
let _ = window.eval(callback_string.as_str());
|
||||
})?;
|
||||
|
||||
@@ -320,7 +320,7 @@ impl<R: Runtime> WindowManager<R> {
|
||||
)
|
||||
};
|
||||
pending.register_uri_scheme_protocol("asset", move |request| {
|
||||
let parsed_path = Url::parse(&request.uri())?;
|
||||
let parsed_path = Url::parse(request.uri())?;
|
||||
let filtered_path = &parsed_path[..Position::AfterPath];
|
||||
#[cfg(target_os = "windows")]
|
||||
let path = filtered_path.replace("asset://localhost/", "");
|
||||
|
||||
@@ -781,7 +781,7 @@ fn default_archive_name_by_os() -> String {
|
||||
|
||||
// Convert base64 to string and prevent failing
|
||||
fn base64_to_string(base64_string: &str) -> Result<String> {
|
||||
let decoded_string = &decode(base64_string.to_owned())?;
|
||||
let decoded_string = &decode(base64_string)?;
|
||||
let result = from_utf8(decoded_string)?.to_string();
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user