@@ -2,7 +2,7 @@ use core::{
22 fmt,
33 fmt:: { Display , Formatter } ,
44} ;
5- use std:: path:: { Path , PathBuf } ;
5+ use std:: path:: PathBuf ;
66
77use getset:: Getters ;
88use libafl_derive;
@@ -228,11 +228,9 @@ impl Display for Bios {
228228}
229229
230230#[ cfg( feature = "systemmode" ) ]
231- impl < R : AsRef < Path > > From < R > for Bios {
232- fn from ( path : R ) -> Self {
233- Self {
234- path : path. as_ref ( ) . to_path_buf ( ) ,
235- }
231+ impl < P : Into < Path > > From < P > for Bios {
232+ fn from ( path : P ) -> Self {
233+ Self { path : path. into ( ) }
236234 }
237235}
238236
@@ -250,11 +248,9 @@ impl Display for Kernel {
250248}
251249
252250#[ cfg( feature = "systemmode" ) ]
253- impl < R : AsRef < Path > > From < R > for Kernel {
254- fn from ( path : R ) -> Self {
255- Self {
256- path : path. as_ref ( ) . to_path_buf ( ) ,
257- }
251+ impl < P : Into < PathBuf > > From < P > for Kernel {
252+ fn from ( path : P ) -> Self {
253+ Self { path : path. into ( ) }
258254 }
259255}
260256
@@ -294,11 +290,9 @@ impl Display for InitRD {
294290}
295291
296292#[ cfg( feature = "systemmode" ) ]
297- impl < R : AsRef < Path > > From < R > for InitRD {
298- fn from ( path : R ) -> Self {
299- Self {
300- path : path. as_ref ( ) . to_path_buf ( ) ,
301- }
293+ impl < P : Into < PathBuf > > From < P > for InitRD {
294+ fn from ( path : P ) -> Self {
295+ Self { path : path. into ( ) }
302296 }
303297}
304298
@@ -313,11 +307,9 @@ impl Display for LoadVM {
313307 }
314308}
315309
316- impl < R : AsRef < Path > > From < R > for LoadVM {
317- fn from ( path : R ) -> Self {
318- Self {
319- path : path. as_ref ( ) . to_path_buf ( ) ,
320- }
310+ impl < P : Into < PathBuf > > From < P > for LoadVM {
311+ fn from ( path : P ) -> Self {
312+ Self { path : path. into ( ) }
321313 }
322314}
323315
@@ -492,11 +484,9 @@ impl Display for Program {
492484}
493485
494486#[ cfg( feature = "usermode" ) ]
495- impl < R : AsRef < Path > > From < R > for Program {
496- fn from ( path : R ) -> Self {
497- Self {
498- path : path. as_ref ( ) . to_path_buf ( ) ,
499- }
487+ impl < P : Into < PathBuf > > From < P > for Program {
488+ fn from ( path : P ) -> Self {
489+ Self { path : path. into ( ) }
500490 }
501491}
502492
0 commit comments