Fix ron deprecation (#5021)
# Objective - Update to fix `ron` deprecation
This commit is contained in:
		
							parent
							
								
									32cd9899c8
								
							
						
					
					
						commit
						ab72c8368f
					
				| @ -871,7 +871,6 @@ bevy_reflect::tests::should_reflect_debug::Test { | |||||||
|     #[cfg(feature = "glam")] |     #[cfg(feature = "glam")] | ||||||
|     mod glam { |     mod glam { | ||||||
|         use super::*; |         use super::*; | ||||||
|         use ::serde::Serialize; |  | ||||||
| 
 | 
 | ||||||
|         #[test] |         #[test] | ||||||
|         fn vec3_serialization() { |         fn vec3_serialization() { | ||||||
| @ -882,17 +881,11 @@ bevy_reflect::tests::should_reflect_debug::Test { | |||||||
| 
 | 
 | ||||||
|             let ser = ReflectSerializer::new(&v, ®istry); |             let ser = ReflectSerializer::new(&v, ®istry); | ||||||
| 
 | 
 | ||||||
|             let mut dest = vec![]; |             let result = ron::to_string(&ser).expect("Failed to serialize to string"); | ||||||
|             let mut serializer = ron::ser::Serializer::new(&mut dest, None, false) |  | ||||||
|                 .expect("Failed to acquire serializer"); |  | ||||||
| 
 |  | ||||||
|             ser.serialize(&mut serializer).expect("Failed to serialize"); |  | ||||||
| 
 |  | ||||||
|             let result = String::from_utf8(dest).expect("Failed to convert to string"); |  | ||||||
| 
 | 
 | ||||||
|             assert_eq!( |             assert_eq!( | ||||||
|                 result, |                 result, | ||||||
|                 r#"{"type":"glam::vec3::Vec3","struct":{"x":{"type":"f32","value":12},"y":{"type":"f32","value":3},"z":{"type":"f32","value":-6.9}}}"# |                 r#"{"type":"glam::vec3::Vec3","struct":{"x":{"type":"f32","value":12.0},"y":{"type":"f32","value":3.0},"z":{"type":"f32","value":-6.9}}}"# | ||||||
|             ); |             ); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -151,8 +151,5 @@ where | |||||||
|         .decimal_floats(true) |         .decimal_floats(true) | ||||||
|         .indentor("  ".to_string()) |         .indentor("  ".to_string()) | ||||||
|         .new_line("\n".to_string()); |         .new_line("\n".to_string()); | ||||||
|     let mut buf = Vec::new(); |     ron::ser::to_string_pretty(&serialize, pretty_config) | ||||||
|     let mut ron_serializer = ron::ser::Serializer::new(&mut buf, Some(pretty_config), false)?; |  | ||||||
|     serialize.serialize(&mut ron_serializer)?; |  | ||||||
|     Ok(String::from_utf8(buf).unwrap()) |  | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 François
						François