File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 * SPDX-License-Identifier: Apache-2.0
1212 ********************************************************************************/
1313
14- use std:: path:: { Path , PathBuf } ;
15- use std:: { env, fs, io} ;
14+ use std:: env;
15+ use std:: path:: PathBuf ;
16+
17+ #[ cfg( feature = "bundled" ) ]
18+ use std:: path:: Path ;
19+ #[ cfg( feature = "bundled" ) ]
20+ use std:: { fs, io} ;
1621
1722#[ cfg( feature = "bundled" ) ]
1823fn vsomeip_includes ( ) -> PathBuf {
@@ -128,7 +133,7 @@ mod build {
128133 }
129134
130135 let out_dir = env:: var_os ( "OUT_DIR" ) . unwrap ( ) ;
131- let submodule_to_patch = PathBuf :: from ( & crate_root) . join ( format ! ( "{}" , submodule_folder) ) ;
136+ let submodule_to_patch = PathBuf :: from ( & crate_root) . join ( submodule_folder) ;
132137 let vsomeip_build_dir = PathBuf :: from ( out_dir) . join ( "vsomeip" ) . join ( "vsomeip_build" ) ;
133138 let copy_res = copy_dir_all ( & submodule_to_patch, & vsomeip_build_dir) ;
134139 println ! (
@@ -332,6 +337,7 @@ mod bindings {
332337 }
333338}
334339
340+ #[ cfg( feature = "bundled" ) ]
335341fn copy_dir_all ( src : impl AsRef < Path > , dst : impl AsRef < Path > ) -> io:: Result < ( ) > {
336342 fs:: create_dir_all ( & dst) ?;
337343 for entry in fs:: read_dir ( src) ? {
You can’t perform that action at this time.
0 commit comments