File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ mod windows {
336
336
}
337
337
338
338
impl Detect {
339
- pub fn detect ( _path : Option < & Path > ) -> anyhow:: Result < impl InstalledApp > {
339
+ pub fn detect < P : AsRef < Path > > ( _path : Option < P > ) -> anyhow:: Result < impl InstalledApp > {
340
340
Ok ( App )
341
341
}
342
342
}
@@ -393,11 +393,14 @@ mod mac_os {
393
393
}
394
394
395
395
impl Detect {
396
- pub fn detect ( path : Option < & Path > ) -> anyhow:: Result < impl InstalledApp > {
396
+ pub fn detect < P : AsRef < Path > > ( path : Option < P > ) -> anyhow:: Result < impl InstalledApp > {
397
397
let bundle_path = if let Some ( bundle_path) = path {
398
- bundle_path
399
- . canonicalize ( )
400
- . with_context ( || format ! ( "Args bundle path {bundle_path:?} canonicalization" ) ) ?
398
+ bundle_path. as_ref ( ) . canonicalize ( ) . with_context ( || {
399
+ format ! (
400
+ "Args bundle path {:?} canonicalization" ,
401
+ bundle_path. as_ref( )
402
+ )
403
+ } ) ?
401
404
} else {
402
405
locate_bundle ( ) . context ( "bundle autodiscovery" ) ?
403
406
} ;
You can’t perform that action at this time.
0 commit comments