File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11use std:: ffi:: c_void;
22use std:: mem:: { size_of, zeroed} ;
33use std:: net:: IpAddr ;
4+ use std:: path:: Path ;
45use std:: process:: Command ;
56
67use anyhow:: { anyhow, bail, Context } ;
78use cidr_utils:: cidr:: IpCidr ;
8- use std:: fs:: Path ;
99use std:: thread:: sleep;
1010use std:: time:: Duration ;
1111use version_compare:: Version ;
@@ -176,8 +176,8 @@ pub fn init_device<T:AsRef<Path>>(
176176 Ok ( device)
177177}
178178
179- fn install_driver ( inf_path : & str ) -> anyhow:: Result < ( ) > {
180- let inf_path = HSTRING :: from ( inf_path) ;
179+ fn install_driver < T : AsRef < Path > > ( inf_path : T ) -> anyhow:: Result < ( ) > {
180+ let inf_path = HSTRING :: from ( inf_path. as_ref ( ) ) ;
181181 let inf_path = PCWSTR ( inf_path. as_ptr ( ) ) ;
182182
183183 let ret = unsafe {
Original file line number Diff line number Diff line change 11mod device_ops;
22pub mod overlapped_file;
33
4+ use std:: path:: Path ;
45use crate :: overlapped_file:: WinOverlappedFile ;
56use anyhow:: bail;
67pub use device_ops:: get_net_index;
78pub use device_ops:: init_device;
89pub use device_ops:: net_config;
910pub use device_ops:: AdapterDevice ;
1011use std:: sync:: Arc ;
11- use std:: fs:: Path ;
1212use tokio:: io;
1313use windows:: core:: GUID ;
1414use windows:: Win32 :: Foundation :: CloseHandle ;
You can’t perform that action at this time.
0 commit comments