File tree 3 files changed +11
-11
lines changed
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ pub enum Value {
118
118
String ( String ) ,
119
119
Boolean ( bool ) ,
120
120
Null ,
121
- EnumValue ( Name ) ,
122
- ListValue ( Vec < Value > ) ,
123
- ObjectValue ( BTreeMap < Name , Value > ) ,
121
+ Enum ( Name ) ,
122
+ List ( Vec < Value > ) ,
123
+ Object ( BTreeMap < Name , Value > ) ,
124
124
}
125
125
126
126
#[ derive( Debug , Clone , PartialEq ) ]
Original file line number Diff line number Diff line change @@ -245,8 +245,8 @@ impl Displayable for Value {
245
245
Value :: Boolean ( true ) => f. write ( "true" ) ,
246
246
Value :: Boolean ( false ) => f. write ( "false" ) ,
247
247
Value :: Null => f. write ( "null" ) ,
248
- Value :: EnumValue ( ref name) => f. write ( name) ,
249
- Value :: ListValue ( ref items) => {
248
+ Value :: Enum ( ref name) => f. write ( name) ,
249
+ Value :: List ( ref items) => {
250
250
f. write ( "[" ) ;
251
251
if items. len ( ) > 0 {
252
252
items[ 0 ] . display ( f) ;
@@ -257,7 +257,7 @@ impl Displayable for Value {
257
257
}
258
258
f. write ( "]" ) ;
259
259
}
260
- Value :: ObjectValue ( ref items) => {
260
+ Value :: Object ( ref items) => {
261
261
f. write ( "{" ) ;
262
262
let mut first = true ;
263
263
for ( ref name, ref value) in items. iter ( ) {
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ pub fn plain_value<'a>(input: &mut TokenStream<'a>)
221
221
ident ( "true" ) . map ( |_| Value :: Boolean ( true ) )
222
222
. or ( ident ( "false" ) . map ( |_| Value :: Boolean ( false ) ) )
223
223
. or ( ident ( "null" ) . map ( |_| Value :: Null ) )
224
- . or ( name ( ) . map ( Value :: EnumValue ) )
224
+ . or ( name ( ) . map ( Value :: Enum ) )
225
225
. or ( parser ( int_value) )
226
226
. or ( parser ( float_value) )
227
227
. or ( parser ( string_value) )
@@ -235,11 +235,11 @@ pub fn value<'a>(input: &mut TokenStream<'a>)
235
235
parser ( plain_value)
236
236
. or ( punct ( "$" ) . with ( name ( ) ) . map ( Value :: Variable ) )
237
237
. or ( punct ( "[" ) . with ( many ( parser ( value) ) ) . skip ( punct ( "]" ) )
238
- . map ( |lst| Value :: ListValue ( lst) ) )
238
+ . map ( |lst| Value :: List ( lst) ) )
239
239
. or ( punct ( "{" )
240
240
. with ( many ( name ( ) . skip ( punct ( ":" ) ) . and ( parser ( value) ) ) )
241
241
. skip ( punct ( "}" ) )
242
- . map ( |lst| Value :: ObjectValue ( lst) ) )
242
+ . map ( |lst| Value :: Object ( lst) ) )
243
243
. parse_stream ( input)
244
244
}
245
245
@@ -248,11 +248,11 @@ pub fn default_value<'a>(input: &mut TokenStream<'a>)
248
248
{
249
249
parser ( plain_value)
250
250
. or ( punct ( "[" ) . with ( many ( parser ( default_value) ) ) . skip ( punct ( "]" ) )
251
- . map ( |lst| Value :: ListValue ( lst) ) )
251
+ . map ( |lst| Value :: List ( lst) ) )
252
252
. or ( punct ( "{" )
253
253
. with ( many ( name ( ) . skip ( punct ( ":" ) ) . and ( parser ( default_value) ) ) )
254
254
. skip ( punct ( "}" ) )
255
- . map ( |map| Value :: ObjectValue ( map) ) )
255
+ . map ( |map| Value :: Object ( map) ) )
256
256
. parse_stream ( input)
257
257
}
258
258
You can’t perform that action at this time.
0 commit comments