@@ -91,7 +91,7 @@ type Result = io::Result<()>;
91
91
///
92
92
/// A [`std::io::Error`] is returned on failure. Because different operating systems
93
93
/// handle errors differently it is recommend to not match on a certain error.
94
- pub fn that < T : AsRef < OsStr > + Sized > ( path : T ) -> Result {
94
+ pub fn that < T : AsRef < OsStr > > ( path : T ) -> Result {
95
95
os:: that ( path)
96
96
}
97
97
@@ -113,22 +113,22 @@ pub fn that<T: AsRef<OsStr> + Sized>(path: T) -> Result {
113
113
///
114
114
/// A [`std::io::Error`] is returned on failure. Because different operating systems
115
115
/// handle errors differently it is recommend to not match on a certain error.
116
- pub fn with < T : AsRef < OsStr > + Sized > ( path : T , app : impl Into < String > ) -> Result {
116
+ pub fn with < T : AsRef < OsStr > > ( path : T , app : impl Into < String > ) -> Result {
117
117
os:: with ( path, app)
118
118
}
119
119
120
120
/// Open path with the default application in a new thread.
121
121
///
122
122
/// See documentation of [`that`] for more details.
123
- pub fn that_in_background < T : AsRef < OsStr > + Sized > ( path : T ) -> thread:: JoinHandle < Result > {
123
+ pub fn that_in_background < T : AsRef < OsStr > > ( path : T ) -> thread:: JoinHandle < Result > {
124
124
let path = path. as_ref ( ) . to_os_string ( ) ;
125
125
thread:: spawn ( || that ( path) )
126
126
}
127
127
128
128
/// Open path with the given application in a new thread.
129
129
///
130
130
/// See documentation of [`with`] for more details.
131
- pub fn with_in_background < T : AsRef < OsStr > + Sized > (
131
+ pub fn with_in_background < T : AsRef < OsStr > > (
132
132
path : T ,
133
133
app : impl Into < String > ,
134
134
) -> thread:: JoinHandle < Result > {
@@ -227,7 +227,7 @@ mod windows {
227
227
Ok ( maybe_result)
228
228
}
229
229
230
- pub fn that < T : AsRef < OsStr > + Sized > ( path : T ) -> Result {
230
+ pub fn that < T : AsRef < OsStr > > ( path : T ) -> Result {
231
231
const SW_SHOW : c_int = 5 ;
232
232
233
233
let path = convert_path ( path. as_ref ( ) ) ?;
@@ -245,7 +245,7 @@ mod windows {
245
245
( result as c_int ) . into_result ( )
246
246
}
247
247
248
- pub fn with < T : AsRef < OsStr > + Sized > ( path : T , app : impl Into < String > ) -> Result {
248
+ pub fn with < T : AsRef < OsStr > > ( path : T , app : impl Into < String > ) -> Result {
249
249
const SW_SHOW : c_int = 5 ;
250
250
251
251
let path = convert_path ( path. as_ref ( ) ) ?;
@@ -273,14 +273,14 @@ mod macos {
273
273
274
274
use crate :: { CommandExt , IntoResult , Result } ;
275
275
276
- pub fn that < T : AsRef < OsStr > + Sized > ( path : T ) -> Result {
276
+ pub fn that < T : AsRef < OsStr > > ( path : T ) -> Result {
277
277
Command :: new ( "/usr/bin/open" )
278
278
. arg ( path. as_ref ( ) )
279
279
. output_stderr ( )
280
280
. into_result ( )
281
281
}
282
282
283
- pub fn with < T : AsRef < OsStr > + Sized > ( path : T , app : impl Into < String > ) -> Result {
283
+ pub fn with < T : AsRef < OsStr > > ( path : T , app : impl Into < String > ) -> Result {
284
284
Command :: new ( "/usr/bin/open" )
285
285
. arg ( path. as_ref ( ) )
286
286
. arg ( "-a" )
@@ -296,15 +296,15 @@ mod ios {
296
296
297
297
use crate :: { CommandExt , IntoResult , Result } ;
298
298
299
- pub fn that < T : AsRef < OsStr > + Sized > ( path : T ) -> Result {
299
+ pub fn that < T : AsRef < OsStr > > ( path : T ) -> Result {
300
300
Command :: new ( "uiopen" )
301
301
. arg ( "--url" )
302
302
. arg ( path. as_ref ( ) )
303
303
. output_stderr ( )
304
304
. into_result ( )
305
305
}
306
306
307
- pub fn with < T : AsRef < OsStr > + Sized > ( path : T , app : impl Into < String > ) -> Result {
307
+ pub fn with < T : AsRef < OsStr > > ( path : T , app : impl Into < String > ) -> Result {
308
308
Command :: new ( "uiopen" )
309
309
. arg ( "--url" )
310
310
. arg ( path. as_ref ( ) )
@@ -335,7 +335,7 @@ mod unix {
335
335
336
336
use crate :: { CommandExt , IntoResult , Result } ;
337
337
338
- pub fn that < T : AsRef < OsStr > + Sized > ( path : T ) -> Result {
338
+ pub fn that < T : AsRef < OsStr > > ( path : T ) -> Result {
339
339
let path = path. as_ref ( ) ;
340
340
let open_handlers = [
341
341
( "xdg-open" , & [ path] as & [ _ ] ) ,
@@ -363,7 +363,7 @@ mod unix {
363
363
. expect ( "successful cases don't get here" ) )
364
364
}
365
365
366
- pub fn with < T : AsRef < OsStr > + Sized > ( path : T , app : impl Into < String > ) -> Result {
366
+ pub fn with < T : AsRef < OsStr > > ( path : T , app : impl Into < String > ) -> Result {
367
367
Command :: new ( app. into ( ) )
368
368
. arg ( path. as_ref ( ) )
369
369
. output_stderr ( )
0 commit comments