Skip to content

Commit 1777406

Browse files
chore: apply some clippy suggestions (#13424)
1 parent d3586a2 commit 1777406

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

crates/tauri-bundler/src/bundle/updater_bundle.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fn bundle_update_windows(settings: &Settings, bundles: &[Bundle]) -> crate::Resu
193193
p.push(c);
194194
(p, b)
195195
});
196-
let archived_path = archived_path.with_extension(format!("{}.zip", bundle_name));
196+
let archived_path = archived_path.with_extension(format!("{bundle_name}.zip"));
197197

198198
log::info!(action = "Bundling"; "{}", display_path(&archived_path));
199199

crates/tauri-runtime-wry/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4858,10 +4858,9 @@ You may have it installed on another user account, but it is not available for t
48584858
.unwrap();
48594859
unsafe {
48604860
let label_ = label.clone();
4861-
let focused_webview_ = focused_webview.clone();
48624861
controller.add_LostFocus(
48634862
&FocusChangedEventHandler::create(Box::new(move |_, _| {
4864-
let mut focused_webview = focused_webview_.lock().unwrap();
4863+
let mut focused_webview = focused_webview.lock().unwrap();
48654864
// when using multiwebview mode, we should handle webview focus changes
48664865
// so we check is the currently focused webview matches this webview's
48674866
// (in this case, it means we lost the window focus)

crates/tauri/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,12 @@ fn define_permissions(
393393
};
394394

395395
let default_toml = format!(
396-
r###"{LICENSE_HEADER}# Automatically generated - DO NOT EDIT!
396+
r#"{LICENSE_HEADER}# Automatically generated - DO NOT EDIT!
397397
398398
[default]
399399
description = "Default permissions for the plugin{all_enable_by_default}."
400400
permissions = [{default_permissions}]
401-
"###,
401+
"#,
402402
);
403403

404404
let out_path = autogenerated.join("default.toml");

crates/tauri/src/manager/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl<R: Runtime> AppManager<R> {
276276
) -> Self {
277277
// generate a random isolation key at runtime
278278
#[cfg(feature = "isolation")]
279-
if let Pattern::Isolation { ref mut key, .. } = &mut context.pattern {
279+
if let Pattern::Isolation { key, .. } = &mut context.pattern {
280280
*key = uuid::Uuid::new_v4().to_string();
281281
}
282282

crates/tauri/src/process.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ pub fn restart(env: &Env) -> ! {
8080
#[cfg(target_os = "macos")]
8181
restart_macos_app(&path, env);
8282

83-
if let Err(e) = Command::new(path)
84-
.args(env.args_os.iter().skip(1).collect::<Vec<_>>())
85-
.spawn()
86-
{
83+
if let Err(e) = Command::new(path).args(env.args_os.iter().skip(1)).spawn() {
8784
log::error!("failed to restart app: {e}");
8885
}
8986
}

0 commit comments

Comments
 (0)