@@ -260,6 +260,7 @@ impl TaggedValue {
260260 TaggedValue :: String ( x) => format ! ( "\" {x}\" " ) ,
261261 TaggedValue :: U32 ( x) => x. to_string ( ) + "_u32" ,
262262 TaggedValue :: U64 ( x) => x. to_string ( ) + "_u64" ,
263+ TaggedValue :: F32 ( x) => x. to_string ( ) + "_f32" ,
263264 TaggedValue :: F64 ( x) => x. to_string ( ) + "_f64" ,
264265 TaggedValue :: Bool ( x) => x. to_string ( ) ,
265266 TaggedValue :: BlendMode ( x) => "BlendMode::" . to_string ( ) + & x. to_string ( ) ,
@@ -351,6 +352,7 @@ impl TaggedValue {
351352 x if x == TypeId :: of :: < ( ) > ( ) => TaggedValue :: None ,
352353 x if x == TypeId :: of :: < String > ( ) => TaggedValue :: String ( string. into ( ) ) ,
353354 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 ( ) ?,
354356 x if x == TypeId :: of :: < u64 > ( ) => FromStr :: from_str ( string) . map ( TaggedValue :: U64 ) . ok ( ) ?,
355357 x if x == TypeId :: of :: < u32 > ( ) => FromStr :: from_str ( string) . map ( TaggedValue :: U32 ) . ok ( ) ?,
356358 x if x == TypeId :: of :: < DVec2 > ( ) => to_dvec2 ( string) . map ( TaggedValue :: DVec2 ) ?,
@@ -381,6 +383,7 @@ impl Display for TaggedValue {
381383 TaggedValue :: String ( x) => f. write_str ( x) ,
382384 TaggedValue :: U32 ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
383385 TaggedValue :: U64 ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
386+ TaggedValue :: F32 ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
384387 TaggedValue :: F64 ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
385388 TaggedValue :: Bool ( x) => f. write_fmt ( format_args ! ( "{x}" ) ) ,
386389 _ => panic ! ( "Cannot convert to string" ) ,
0 commit comments