@@ -260,6 +260,7 @@ impl TaggedValue {
260
260
TaggedValue :: String ( x) => format ! ( "\" {x}\" " ) ,
261
261
TaggedValue :: U32 ( x) => x. to_string ( ) + "_u32" ,
262
262
TaggedValue :: U64 ( x) => x. to_string ( ) + "_u64" ,
263
+ TaggedValue :: F32 ( x) => x. to_string ( ) + "_f32" ,
263
264
TaggedValue :: F64 ( x) => x. to_string ( ) + "_f64" ,
264
265
TaggedValue :: Bool ( x) => x. to_string ( ) ,
265
266
TaggedValue :: BlendMode ( x) => "BlendMode::" . to_string ( ) + & x. to_string ( ) ,
@@ -351,6 +352,7 @@ impl TaggedValue {
351
352
x if x == TypeId :: of :: < ( ) > ( ) => TaggedValue :: None ,
352
353
x if x == TypeId :: of :: < String > ( ) => TaggedValue :: String ( string. into ( ) ) ,
353
354
x if x == TypeId :: of :: < f64 > ( ) => FromStr :: from_str ( string) . map ( TaggedValue :: F64 ) . ok ( ) ?,
355
+ x if x == TypeId :: of :: < f32 > ( ) => FromStr :: from_str ( string) . map ( TaggedValue :: F32 ) . ok ( ) ?,
354
356
x if x == TypeId :: of :: < u64 > ( ) => FromStr :: from_str ( string) . map ( TaggedValue :: U64 ) . ok ( ) ?,
355
357
x if x == TypeId :: of :: < u32 > ( ) => FromStr :: from_str ( string) . map ( TaggedValue :: U32 ) . ok ( ) ?,
356
358
x if x == TypeId :: of :: < DVec2 > ( ) => to_dvec2 ( string) . map ( TaggedValue :: DVec2 ) ?,
@@ -381,6 +383,7 @@ impl Display for TaggedValue {
381
383
TaggedValue :: String ( x) => f. write_str ( x) ,
382
384
TaggedValue :: U32 ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
383
385
TaggedValue :: U64 ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
386
+ TaggedValue :: F32 ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
384
387
TaggedValue :: F64 ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
385
388
TaggedValue :: Bool ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
386
389
_ => panic ! ( "Cannot convert to string" ) ,
0 commit comments