@@ -96,7 +96,7 @@ impl Parser {
9696 . expect ( "Key unexpectedly missing" ) ;
9797 let parsed = self . parse ( & value, None ) ?;
9898 self . parsed_schemas
99- . insert ( self . get_schema_type_name ( name, value) , parsed) ;
99+ . insert ( self . get_schema_type_name ( name, & value) , parsed) ;
100100 }
101101 Ok ( ( ) )
102102 }
@@ -197,7 +197,7 @@ impl Parser {
197197 // parsing a full schema from inside another schema. Other full schema will not inherit namespace
198198 let parsed = self . parse ( & value, None ) ?;
199199 self . parsed_schemas . insert (
200- self . get_schema_type_name ( fully_qualified_name, value) ,
200+ self . get_schema_type_name ( fully_qualified_name, & value) ,
201201 parsed. clone ( ) ,
202202 ) ;
203203
@@ -583,7 +583,7 @@ impl Parser {
583583 doc : complex. doc ( ) ,
584584 fields,
585585 lookup,
586- attributes : self . get_custom_attributes ( complex, vec ! [ "fields" ] ) ,
586+ attributes : self . get_custom_attributes ( complex, & [ "fields" ] ) ,
587587 } ) ;
588588
589589 self . register_parsed_schema ( & fully_qualified_name, & schema, & aliases) ;
@@ -593,7 +593,7 @@ impl Parser {
593593 fn get_custom_attributes (
594594 & self ,
595595 complex : & Map < String , Value > ,
596- excluded : Vec < & ' static str > ,
596+ excluded : & [ & ' static str ] ,
597597 ) -> BTreeMap < String , Value > {
598598 let mut custom_attributes: BTreeMap < String , Value > = BTreeMap :: new ( ) ;
599599 for ( key, value) in complex {
@@ -675,7 +675,7 @@ impl Parser {
675675 doc : complex. doc ( ) ,
676676 symbols,
677677 default,
678- attributes : self . get_custom_attributes ( complex, vec ! [ "symbols" , "default" ] ) ,
678+ attributes : self . get_custom_attributes ( complex, & [ "symbols" , "default" ] ) ,
679679 } ) ;
680680
681681 self . register_parsed_schema ( & fully_qualified_name, & schema, & aliases) ;
@@ -695,7 +695,7 @@ impl Parser {
695695 . and_then ( |items| self . parse ( items, enclosing_namespace) ) ?;
696696 Ok ( Schema :: Array ( ArraySchema {
697697 items : Box :: new ( items) ,
698- attributes : self . get_custom_attributes ( complex, vec ! [ "items" ] ) ,
698+ attributes : self . get_custom_attributes ( complex, & [ "items" ] ) ,
699699 } ) )
700700 }
701701
@@ -712,7 +712,7 @@ impl Parser {
712712
713713 Ok ( Schema :: Map ( MapSchema {
714714 types : Box :: new ( types) ,
715- attributes : self . get_custom_attributes ( complex, vec ! [ "values" ] ) ,
715+ attributes : self . get_custom_attributes ( complex, & [ "values" ] ) ,
716716 } ) )
717717 }
718718
@@ -778,7 +778,7 @@ impl Parser {
778778 aliases : aliases. clone ( ) ,
779779 doc,
780780 size : size as usize ,
781- attributes : self . get_custom_attributes ( complex, vec ! [ "size" ] ) ,
781+ attributes : self . get_custom_attributes ( complex, & [ "size" ] ) ,
782782 } ) ;
783783
784784 self . register_parsed_schema ( & fully_qualified_name, & schema, & aliases) ;
@@ -814,7 +814,7 @@ impl Parser {
814814 } )
815815 }
816816
817- fn get_schema_type_name ( & self , name : Name , value : Value ) -> Name {
817+ fn get_schema_type_name ( & self , name : Name , value : & Value ) -> Name {
818818 match value. get ( "type" ) {
819819 Some ( Value :: Object ( complex_type) ) => match complex_type. name ( ) {
820820 Some ( name) => Name :: new ( name) . unwrap ( ) ,
0 commit comments