Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

23
vendor/ron/tests/to_string_pretty.rs vendored Normal file
View File

@@ -0,0 +1,23 @@
use ron::{
ser::{to_string_pretty, PrettyConfig},
to_string,
};
use serde::{Deserialize, Serialize};
#[derive(Debug, PartialEq, Deserialize, Serialize)]
struct Point {
x: f64,
y: f64,
}
#[test]
fn test_struct_names() {
let value = Point { x: 1.0, y: 2.0 };
let struct_name = to_string_pretty(&value, PrettyConfig::default().struct_names(true));
assert_eq!(
struct_name,
Ok("Point(\n x: 1.0,\n y: 2.0,\n)".to_string())
);
let no_struct_name = to_string(&value);
assert_eq!(no_struct_name, Ok("(x:1.0,y:2.0)".to_string()));
}