@@ -123,12 +123,12 @@ pub fn glob_to_path(
123
123
for include in includes {
124
124
// Remove trailing `/` as we add one explicitly in the override
125
125
let include = include. trim_end_matches ( '/' ) ;
126
- for extension in extensions. clone ( ) . into_iter ( ) {
126
+ for extension in extensions. into_iter ( ) {
127
127
overrides_builder. add ( & format ! ( "{}/**/{}" , include, extension) ) ?;
128
128
}
129
129
}
130
130
} else {
131
- for extension in extensions. clone ( ) . into_iter ( ) {
131
+ for extension in extensions. into_iter ( ) {
132
132
overrides_builder. add ( & extension) ?;
133
133
}
134
134
}
@@ -255,14 +255,14 @@ pub enum FileExtensions {
255
255
MultipleFile ( Vec < String > ) ,
256
256
}
257
257
258
- impl IntoIterator for FileExtensions {
259
- type Item = String ;
260
- type IntoIter = either:: Either < std:: iter:: Once < String > , std:: vec :: IntoIter < String > > ;
258
+ impl < ' a > IntoIterator for & ' a FileExtensions {
259
+ type Item = & ' a String ;
260
+ type IntoIter = either:: Either < std:: iter:: Once < & ' a String > , std:: slice :: Iter < ' a , String > > ;
261
261
262
262
fn into_iter ( self ) -> Self :: IntoIter {
263
263
match self {
264
264
FileExtensions :: SingleFile ( glob) => either:: Either :: Left ( std:: iter:: once ( glob) ) ,
265
- FileExtensions :: MultipleFile ( globs) => either:: Either :: Right ( globs. into_iter ( ) ) ,
265
+ FileExtensions :: MultipleFile ( globs) => either:: Either :: Right ( globs. iter ( ) ) ,
266
266
}
267
267
}
268
268
}
0 commit comments