File tree Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -267,16 +267,16 @@ mod imp {
267
267
let key_reg = CURRENT_USER . create ( & key_base) ?;
268
268
key_reg. set_string (
269
269
"" ,
270
- & format ! ( "URL:{} protocol" , self . app. config( ) . identifier) ,
270
+ format ! ( "URL:{} protocol" , self . app. config( ) . identifier) ,
271
271
) ?;
272
272
key_reg. set_string ( "URL Protocol" , "" ) ?;
273
273
274
274
let icon_reg = CURRENT_USER . create ( format ! ( "{key_base}\\ DefaultIcon" ) ) ?;
275
- icon_reg. set_string ( "" , & format ! ( "{exe},0" ) ) ?;
275
+ icon_reg. set_string ( "" , format ! ( "{exe},0" ) ) ?;
276
276
277
277
let cmd_reg = CURRENT_USER . create ( format ! ( "{key_base}\\ shell\\ open\\ command" ) ) ?;
278
278
279
- cmd_reg. set_string ( "" , & format ! ( "\" {exe}\" \" %1\" " ) ) ?;
279
+ cmd_reg. set_string ( "" , format ! ( "\" {exe}\" \" %1\" " ) ) ?;
280
280
281
281
Ok ( ( ) )
282
282
}
Original file line number Diff line number Diff line change @@ -54,9 +54,7 @@ impl FilePath {
54
54
pub fn into_path ( self ) -> Result < PathBuf > {
55
55
match self {
56
56
Self :: Url ( url) => url
57
- . to_file_path ( )
58
- . map ( PathBuf :: from)
59
- . map_err ( |_| Error :: InvalidPathUrl ) ,
57
+ . to_file_path ( ) . map_err ( |_| Error :: InvalidPathUrl ) ,
60
58
Self :: Path ( p) => Ok ( p) ,
61
59
}
62
60
}
@@ -92,9 +90,7 @@ impl SafeFilePath {
92
90
pub fn into_path ( self ) -> Result < PathBuf > {
93
91
match self {
94
92
Self :: Url ( url) => url
95
- . to_file_path ( )
96
- . map ( PathBuf :: from)
97
- . map_err ( |_| Error :: InvalidPathUrl ) ,
93
+ . to_file_path ( ) . map_err ( |_| Error :: InvalidPathUrl ) ,
98
94
Self :: Path ( p) => Ok ( p. as_ref ( ) . to_owned ( ) ) ,
99
95
}
100
96
}
Original file line number Diff line number Diff line change @@ -56,8 +56,7 @@ impl<R: Runtime> Opener<R> {
56
56
/// - **Android / iOS**: Always opens using default program.
57
57
#[ cfg( desktop) ]
58
58
pub fn open_url ( & self , url : impl Into < String > , with : Option < impl Into < String > > ) -> Result < ( ) > {
59
- crate :: open:: open ( url. into ( ) , with. map ( Into :: into) ) . map_err ( Into :: into)
60
- }
59
+ crate :: open:: open ( url. into ( ) , with. map ( Into :: into) ) }
61
60
62
61
/// Open a url with a default or specific program.
63
62
///
@@ -108,8 +107,7 @@ impl<R: Runtime> Opener<R> {
108
107
path : impl Into < String > ,
109
108
with : Option < impl Into < String > > ,
110
109
) -> Result < ( ) > {
111
- crate :: open:: open ( path. into ( ) , with. map ( Into :: into) ) . map_err ( Into :: into)
112
- }
110
+ crate :: open:: open ( path. into ( ) , with. map ( Into :: into) ) }
113
111
114
112
/// Open a path with a default or specific program.
115
113
///
Original file line number Diff line number Diff line change @@ -75,8 +75,7 @@ impl<R: Runtime> Shell<R> {
75
75
#[ deprecated( since = "2.1.0" , note = "Use tauri-plugin-opener instead." ) ]
76
76
#[ allow( deprecated) ]
77
77
pub fn open ( & self , path : impl Into < String > , with : Option < open:: Program > ) -> Result < ( ) > {
78
- open:: open ( & self . open_scope , path. into ( ) , with) . map_err ( Into :: into)
79
- }
78
+ open:: open ( & self . open_scope , path. into ( ) , with) }
80
79
81
80
/// Open a (url) path with a default or specific browser opening program.
82
81
///
You can’t perform that action at this time.
0 commit comments