File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -67,13 +67,6 @@ impl LanguageMethods for Go {
6767 . with_context ( || format ! ( "unable to read `{}`" , path. display( ) ) ) ?;
6868 let package_name = package_name ( & test) ;
6969 let package_dir = compile. bindings_dir . join ( package_name) ;
70- // Windows gets upset if the path contains mixed separators
71- let package_dir = PathBuf :: from (
72- package_dir
73- . to_str ( )
74- . ok_or_else ( || anyhow:: anyhow!( "non-utf8 path: `{}`" , package_dir. display( ) ) ) ?
75- . replace ( [ '\\' , '/' ] , & std:: path:: MAIN_SEPARATOR . to_string ( ) ) ,
76- ) ;
7770 fs:: create_dir_all ( & package_dir)
7871 . with_context ( || format ! ( "unable to create `{}`" , package_dir. display( ) ) ) ?;
7972 let output = & package_dir. join ( path. file_name ( ) . unwrap ( ) ) ;
@@ -120,6 +113,7 @@ fn package_name(package: &str) -> &str {
120113 . 0
121114 . strip_prefix ( "package " )
122115 . unwrap ( )
116+ . trim ( )
123117}
124118
125119fn all_paths ( path : & Path ) -> Result < Vec < PathBuf > > {
You can’t perform that action at this time.
0 commit comments