2
2
use crate :: parser:: get_meta_items;
3
3
use log:: { debug, error, log_enabled, warn} ;
4
4
use quote:: ToTokens ;
5
- use std:: collections:: VecDeque ;
6
5
use syn:: { punctuated:: Punctuated , Attribute , Expr , ExprLit , Lit , Meta , Token } ;
7
6
8
7
#[ derive( Copy , Clone , Default , Debug ) ]
@@ -14,13 +13,13 @@ enum TargetScope {
14
13
15
14
#[ derive( Default ) ]
16
15
struct TargetOsIterator {
17
- meta : VecDeque < ( TargetScope , Meta ) > ,
16
+ meta : Vec < ( TargetScope , Meta ) > ,
18
17
}
19
18
20
19
impl TargetOsIterator {
21
20
fn new ( meta : Meta ) -> Self {
22
21
Self {
23
- meta : VecDeque :: from ( [ ( TargetScope :: Accept , meta) ] ) ,
22
+ meta : Vec :: from ( [ ( TargetScope :: Accept , meta) ] ) ,
24
23
}
25
24
}
26
25
}
@@ -29,7 +28,7 @@ impl Iterator for TargetOsIterator {
29
28
type Item = ( TargetScope , String ) ;
30
29
31
30
fn next ( & mut self ) -> Option < Self :: Item > {
32
- while let Some ( ( mut scope, meta) ) = self . meta . pop_front ( ) {
31
+ while let Some ( ( mut scope, meta) ) = self . meta . pop ( ) {
33
32
if meta. path ( ) . is_ident ( "not" ) {
34
33
debug ! ( "encountered not" ) ;
35
34
scope = TargetScope :: Reject
0 commit comments