File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -80,15 +80,15 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
8080}
8181
8282fn 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
8689fn 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 }
You can’t perform that action at this time.
0 commit comments