@@ -76,18 +76,18 @@ impl OptionsBuilder {
76
76
self
77
77
}
78
78
79
- pub fn load_paths ( mut self , arg : Vec < String > ) -> Self {
80
- self . options . load_paths = Some ( arg) ;
79
+ pub fn load_paths ( mut self , arg : impl IntoIterator < Item = String > ) -> Self {
80
+ self . options . load_paths = Some ( arg. into_iter ( ) . collect ( ) ) ;
81
81
self
82
82
}
83
83
84
- pub fn load_path ( mut self , arg : & str ) -> Self {
84
+ pub fn load_path ( mut self , arg : impl Into < String > ) -> Self {
85
85
let mut load_paths = if let Some ( load_paths) = self . options . load_paths {
86
86
load_paths
87
87
} else {
88
88
Vec :: new ( )
89
89
} ;
90
- load_paths. push ( arg. to_owned ( ) ) ;
90
+ load_paths. push ( arg. into ( ) ) ;
91
91
self . options . load_paths = Some ( load_paths) ;
92
92
self
93
93
}
@@ -228,8 +228,8 @@ impl StringOptionsBuilder {
228
228
self
229
229
}
230
230
231
- pub fn url ( mut self , arg : Url ) -> Self {
232
- self . url = Some ( arg) ;
231
+ pub fn url ( mut self , arg : impl Into < Url > ) -> Self {
232
+ self . url = Some ( arg. into ( ) ) ;
233
233
self
234
234
}
235
235
@@ -243,18 +243,18 @@ impl StringOptionsBuilder {
243
243
self
244
244
}
245
245
246
- pub fn load_paths ( mut self , arg : Vec < String > ) -> Self {
247
- self . options . load_paths = Some ( arg) ;
246
+ pub fn load_paths ( mut self , arg : impl IntoIterator < Item = String > ) -> Self {
247
+ self . options . load_paths = Some ( arg. into_iter ( ) . collect ( ) ) ;
248
248
self
249
249
}
250
250
251
- pub fn load_path ( mut self , arg : & str ) -> Self {
251
+ pub fn load_path ( mut self , arg : impl Into < String > ) -> Self {
252
252
let mut load_paths = if let Some ( load_paths) = self . options . load_paths {
253
253
load_paths
254
254
} else {
255
255
Vec :: new ( )
256
256
} ;
257
- load_paths. push ( arg. to_owned ( ) ) ;
257
+ load_paths. push ( arg. into ( ) ) ;
258
258
self . options . load_paths = Some ( load_paths) ;
259
259
self
260
260
}
@@ -363,14 +363,14 @@ pub enum SassImporter {
363
363
/// https://sass-lang.com/documentation/js-api/interfaces/Importer
364
364
pub trait Importer : Debug + Send + Sync {
365
365
/// https://sass-lang.com/documentation/js-api/interfaces/Importer#canonicalize
366
- fn canonicalize < ' u , ' o > (
366
+ fn canonicalize (
367
367
& self ,
368
- url : & ' u str ,
369
- options : & ' o ImporterOptions ,
368
+ url : & str ,
369
+ options : & ImporterOptions ,
370
370
) -> Result < Option < Url > > ;
371
371
372
372
/// https://sass-lang.com/documentation/js-api/interfaces/Importer#load
373
- fn load < ' u > ( & self , canonical_url : & ' u Url ) -> Result < Option < ImporterResult > > ;
373
+ fn load ( & self , canonical_url : & Url ) -> Result < Option < ImporterResult > > ;
374
374
}
375
375
376
376
pub struct ImporterOptions {
@@ -380,10 +380,10 @@ pub struct ImporterOptions {
380
380
/// https://sass-lang.com/documentation/js-api/interfaces/FileImporter
381
381
pub trait FileImporter : Debug + Send + Sync {
382
382
/// https://sass-lang.com/documentation/js-api/interfaces/FileImporter#findFileUrl
383
- fn find_file_url < ' u , ' o > (
383
+ fn find_file_url (
384
384
& self ,
385
- url : & ' u str ,
386
- options : & ' o ImporterOptions ,
385
+ url : & str ,
386
+ options : & ImporterOptions ,
387
387
) -> Result < Option < Url > > ;
388
388
}
389
389
0 commit comments