Skip to content

Commit 3bafda9

Browse files
committed
cargo fmt & clippy
1 parent 6108072 commit 3bafda9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/lib.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
8080
}
8181

8282
fn cleanup_path_for_python(path: &PathBuf) -> String {
83-
dunce::canonicalize(&path).unwrap().to_string_lossy().replace("\\", "/")
83+
dunce::canonicalize(path)
84+
.unwrap()
85+
.to_string_lossy()
86+
.replace("\\", "/")
8487
}
8588

8689
fn init_python(code: String, dir: PathBuf) {
8790
#[allow(unused_mut)]
88-
let mut sys_pyth_dir = vec![format!(
89-
"\"{}\"",
90-
cleanup_path_for_python(&dir)
91-
)];
91+
let mut sys_pyth_dir = vec![format!("\"{}\"", cleanup_path_for_python(&dir))];
9292
#[cfg(feature = "venv")]
9393
{
9494
let venv_dir = dir.join(".venv").join("lib");
@@ -98,10 +98,8 @@ fn init_python(code: String, dir: PathBuf) {
9898
let site_packages = entry.path().join("site-packages");
9999
// use first folder with site-packages for venv, ignore venv version
100100
if Path::exists(site_packages.as_path()) {
101-
sys_pyth_dir.push(format!(
102-
"\"{}\"",
103-
cleanup_path_for_python(&site_packages)
104-
));
101+
sys_pyth_dir
102+
.push(format!("\"{}\"", cleanup_path_for_python(&site_packages)));
105103
break;
106104
}
107105
}

0 commit comments

Comments
 (0)