mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-01-31 00:35:19 +01:00
chore: apply some clippy suggestions (#13424)
This commit is contained in:
@@ -193,7 +193,7 @@ fn bundle_update_windows(settings: &Settings, bundles: &[Bundle]) -> crate::Resu
|
||||
p.push(c);
|
||||
(p, b)
|
||||
});
|
||||
let archived_path = archived_path.with_extension(format!("{}.zip", bundle_name));
|
||||
let archived_path = archived_path.with_extension(format!("{bundle_name}.zip"));
|
||||
|
||||
log::info!(action = "Bundling"; "{}", display_path(&archived_path));
|
||||
|
||||
|
||||
@@ -4858,10 +4858,9 @@ You may have it installed on another user account, but it is not available for t
|
||||
.unwrap();
|
||||
unsafe {
|
||||
let label_ = label.clone();
|
||||
let focused_webview_ = focused_webview.clone();
|
||||
controller.add_LostFocus(
|
||||
&FocusChangedEventHandler::create(Box::new(move |_, _| {
|
||||
let mut focused_webview = focused_webview_.lock().unwrap();
|
||||
let mut focused_webview = focused_webview.lock().unwrap();
|
||||
// when using multiwebview mode, we should handle webview focus changes
|
||||
// so we check is the currently focused webview matches this webview's
|
||||
// (in this case, it means we lost the window focus)
|
||||
|
||||
@@ -393,12 +393,12 @@ fn define_permissions(
|
||||
};
|
||||
|
||||
let default_toml = format!(
|
||||
r###"{LICENSE_HEADER}# Automatically generated - DO NOT EDIT!
|
||||
r#"{LICENSE_HEADER}# Automatically generated - DO NOT EDIT!
|
||||
|
||||
[default]
|
||||
description = "Default permissions for the plugin{all_enable_by_default}."
|
||||
permissions = [{default_permissions}]
|
||||
"###,
|
||||
"#,
|
||||
);
|
||||
|
||||
let out_path = autogenerated.join("default.toml");
|
||||
|
||||
@@ -276,7 +276,7 @@ impl<R: Runtime> AppManager<R> {
|
||||
) -> Self {
|
||||
// generate a random isolation key at runtime
|
||||
#[cfg(feature = "isolation")]
|
||||
if let Pattern::Isolation { ref mut key, .. } = &mut context.pattern {
|
||||
if let Pattern::Isolation { key, .. } = &mut context.pattern {
|
||||
*key = uuid::Uuid::new_v4().to_string();
|
||||
}
|
||||
|
||||
|
||||
@@ -80,10 +80,7 @@ pub fn restart(env: &Env) -> ! {
|
||||
#[cfg(target_os = "macos")]
|
||||
restart_macos_app(&path, env);
|
||||
|
||||
if let Err(e) = Command::new(path)
|
||||
.args(env.args_os.iter().skip(1).collect::<Vec<_>>())
|
||||
.spawn()
|
||||
{
|
||||
if let Err(e) = Command::new(path).args(env.args_os.iter().skip(1)).spawn() {
|
||||
log::error!("failed to restart app: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user