Remove serde_json from egui dev-dependencies

This commit is contained in:
Emil Ernerfeldt 2021-10-23 04:47:17 +02:00
parent 79d1ede496
commit 5d463b2af7
4 changed files with 8 additions and 12 deletions

1
Cargo.lock generated
View File

@ -855,7 +855,6 @@ dependencies = [
"nohash-hasher",
"ron",
"serde",
"serde_json",
]
[[package]]

View File

@ -61,6 +61,3 @@ convert_bytemuck = ["epaint/convert_bytemuck"]
# from multiple threads. It comes with a minor performance impact.
single_threaded = ["epaint/single_threaded"]
multi_threaded = ["epaint/multi_threaded"]
[dev-dependencies]
serde_json = "1"

View File

@ -111,10 +111,10 @@ impl IdAnyMap {
// let file_string = {
// let mut map: AnyMap<i32> = Default::default();
// map.insert(1, State1 { a: 42 });
// serde_json::to_string(&map).unwrap()
// ron::to_string(&map).unwrap()
// };
// let mut map: AnyMap<i32> = serde_json::from_str(&file_string).unwrap();
// let mut map: AnyMap<i32> = ron::from_str(&file_string).unwrap();
// assert!(map.get::<State2>(&1).is_none());
// assert_eq!(map.get::<State1>(&1), Some(&State1 { a: 42 }));
// }
@ -139,10 +139,10 @@ impl IdAnyMap {
// let file_string = {
// let mut map: AnyMap<i32> = Default::default();
// map.insert(1, State { a: 42 });
// serde_json::to_string(&map).unwrap()
// ron::to_string(&map).unwrap()
// };
// let mut map: AnyMap<i32> = serde_json::from_str(&file_string).unwrap();
// let mut map: AnyMap<i32> = ron::from_str(&file_string).unwrap();
// assert_eq!(
// map.get::<StateNew>(&1),
// Some(&StateNew {

View File

@ -90,10 +90,10 @@ fn discard_different_struct() {
let file_string = {
let mut map: TypeMap = Default::default();
map.insert(State1 { a: 42 });
serde_json::to_string(&map).unwrap()
ron::to_string(&map).unwrap()
};
let mut map: TypeMap = serde_json::from_str(&file_string).unwrap();
let mut map: TypeMap = ron::from_str(&file_string).unwrap();
assert!(map.get::<State2>().is_none());
}
@ -115,10 +115,10 @@ fn new_field_between_runs() {
let file_string = {
let mut map: TypeMap = Default::default();
map.insert(State { a: 42 });
serde_json::to_string(&map).unwrap()
ron::to_string(&map).unwrap()
};
let mut map: TypeMap = serde_json::from_str(&file_string).unwrap();
let mut map: TypeMap = ron::from_str(&file_string).unwrap();
assert!(map.get::<StateNew>().is_none());
}