Skip to content

Commit 9621e9a

Browse files
committed
clippy
1 parent 0b9a2f9 commit 9621e9a

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

core/tauri-build/src/lib.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fn copy_dir(from: &Path, to: &Path) -> Result<()> {
128128

129129
// Copies the framework under `{src_dir}/{framework}.framework` to `{dest_dir}/{framework}.framework`.
130130
fn copy_framework_from(src_dir: &Path, framework: &str, dest_dir: &Path) -> Result<bool> {
131-
let src_name = format!("{}.framework", framework);
131+
let src_name = format!("{framework}.framework");
132132
let src_path = src_dir.join(&src_name);
133133
if src_path.exists() {
134134
copy_dir(&src_path, &dest_dir.join(&src_name))?;
@@ -140,12 +140,8 @@ fn copy_framework_from(src_dir: &Path, framework: &str, dest_dir: &Path) -> Resu
140140

141141
// Copies the macOS application bundle frameworks to the target folder
142142
fn copy_frameworks(dest_dir: &Path, frameworks: &[String]) -> Result<()> {
143-
std::fs::create_dir_all(dest_dir).with_context(|| {
144-
format!(
145-
"Failed to create frameworks output directory at {:?}",
146-
dest_dir
147-
)
148-
})?;
143+
std::fs::create_dir_all(dest_dir)
144+
.with_context(|| format!("Failed to create frameworks output directory at {dest_dir:?}"))?;
149145
for framework in frameworks.iter() {
150146
if framework.ends_with(".framework") {
151147
let src_path = PathBuf::from(framework);

core/tauri/src/test/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ mod tests {
360360
});
361361

362362
app.run(|_app, event| {
363-
println!("{:?}", event);
363+
println!("{event:?}");
364364
});
365365
}
366366
}

core/tauri/src/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,7 @@ pub(crate) fn ipc_scope_not_found_error_message(label: &str, url: &str) -> Strin
19961996
}
19971997

19981998
pub(crate) fn ipc_scope_window_error_message(label: &str) -> String {
1999-
format!("Scope not defined for window `{}`. See https://tauri.app/v1/api/config/#securityconfig.dangerousremotedomainipcaccess and https://docs.rs/tauri/1/tauri/scope/struct.IpcScope.html#method.configure_remote_access", label)
1999+
format!("Scope not defined for window `{label}`. See https://tauri.app/v1/api/config/#securityconfig.dangerousremotedomainipcaccess and https://docs.rs/tauri/1/tauri/scope/struct.IpcScope.html#method.configure_remote_access")
20002000
}
20012001

20022002
pub(crate) fn ipc_scope_domain_error_message(url: &str) -> String {

core/tests/app-updater/tests/update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ fn update_app_flow<F: FnOnce(Options<'_>) -> (PathBuf, TauriVersion)>(build_app_
408408
.unwrap_or_else(|_| panic!("failed to read signature file {}", signature_path.display()));
409409

410410
let out_updater_path =
411-
out_bundle_path.with_extension(format!("{}.{}", bundle_updater_ext, updater_zip_ext));
411+
out_bundle_path.with_extension(format!("{bundle_updater_ext}.{updater_zip_ext}"));
412412

413413
(out_updater_path, signature)
414414
} else {

0 commit comments

Comments
 (0)