File tree Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -631,32 +631,15 @@ impl Builder {
631631 K : Make < Path > ,
632632 V : Make < Lit > ,
633633 {
634- let key = key. make ( & self ) ;
635- let value = value. make ( & self ) ;
636-
637- let mnv = MetaNameValue {
638- path : key,
639- eq_token : Token ! [ =] ( self . span ) ,
640- value : Expr :: Lit ( ExprLit {
641- attrs : vec ! [ ] ,
642- lit : value,
643- } ) ,
644- } ;
645- self . prepared_attr ( Meta :: NameValue ( mnv) )
634+ let meta = mk ( ) . meta_namevalue ( key, value) ;
635+ self . prepared_attr ( meta)
646636 }
647637
648638 pub fn single_attr < K > ( self , key : K ) -> Self
649639 where
650- K : Make < PathSegment > ,
640+ K : Make < Path > ,
651641 {
652- let mut segments = Punctuated :: new ( ) ;
653- segments. push ( key. make ( & self ) ) ;
654-
655- let meta = Meta :: Path ( Path {
656- leading_colon : None ,
657- segments,
658- } ) ;
659-
642+ let meta = mk ( ) . meta_path ( key) ;
660643 self . prepared_attr ( meta)
661644 }
662645
@@ -665,7 +648,7 @@ impl Builder {
665648 K : Make < Path > ,
666649 V : Make < TokenStream > ,
667650 {
668- let meta = self . clone ( ) . meta_list ( func, arguments) ;
651+ let meta = mk ( ) . meta_list ( func, arguments) ;
669652 self . prepared_attr ( meta)
670653 }
671654
You can’t perform that action at this time.
0 commit comments