Lines
100 %
Functions
Branches
use ron::ser::{to_string_pretty, PrettyConfig};
#[test]
fn small_array() {
let arr = &[(), (), ()][..];
assert_eq!(
to_string_pretty(&arr, PrettyConfig::new().new_line("\n")).unwrap(),
"[
(),
]"
);
to_string_pretty(
&arr,
PrettyConfig::new().new_line("\n").compact_arrays(true)
)
.unwrap(),
"[(), (), ()]"
PrettyConfig::new()
.new_line("\n")
.compact_arrays(true)
.separator("")
"[(),(),()]"
&vec![(1, 2), (3, 4)],
.separate_tuple_members(true)
"[(
1,
2,
), (
3,
4,
)]"
}