Skip to content

Commit 93bce89

Browse files
committed
Remove serde_cbor and its usage in serde test
1 parent f703df2 commit 93bce89

File tree

3 files changed

+1
-29
lines changed

3 files changed

+1
-29
lines changed

test/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ ron = "0.7.0"
2222
serde = "1.0.130"
2323
serde_json = "1.0.68"
2424
bincode = "1.3.3"
25-
serde_cbor = "0.11.2"
2625
serde_yaml = "0.8.21"
2726
rmp-serde = "0.15.5"
2827
futures = "0.3.17"

test/src/test_serde.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pub(crate) fn run_tests() -> bool {
1616
status &= test_ron();
1717
status &= test_json();
1818
status &= test_yaml();
19-
status &= test_cbor();
2019
status &= test_msgpack();
2120
status &= test_bincode();
2221

@@ -232,32 +231,6 @@ fn test_yaml() -> bool {
232231
ok
233232
}
234233

235-
fn test_cbor() -> bool {
236-
println!(" -- test_cbor");
237-
238-
let ok = std::panic::catch_unwind(|| {
239-
let foo = Foo::new();
240-
241-
let cbor_bytes = serde_cbor::to_vec(&foo).expect("Foo to CBOR");
242-
let result = serde_cbor::from_slice::<Foo>(&cbor_bytes).expect("Foo from CBOR");
243-
assert_eq!(foo, result);
244-
245-
let cbor_bytes =
246-
serde_cbor::to_vec(&foo.to_variant().dispatch()).expect("Dispatch to CBOR");
247-
let disp =
248-
serde_cbor::from_slice::<VariantDispatch>(&cbor_bytes).expect("Dispatch from CBOR");
249-
let result = Foo::from_variant(&Variant::from(&disp)).expect("Foo from Dispatch from CBOR");
250-
assert_eq!(foo, result);
251-
})
252-
.is_ok();
253-
254-
if !ok {
255-
godot_error!(" !! Test test_cbor failed");
256-
}
257-
258-
ok
259-
}
260-
261234
fn test_msgpack() -> bool {
262235
println!(" -- test_msgpack");
263236

tools/deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ notice = "warn"
4848
# A list of advisory IDs to ignore. Note that ignored advisories will still
4949
# output a note when they are encountered.
5050
ignore = [
51-
"RUSTSEC-2021-0127", # serde_cbor unmaintained; only used in tests
51+
# "RUSTSEC-0000-0000",
5252
]
5353
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
5454
# lower than the range specified will be ignored. Note that ignored advisories

0 commit comments

Comments
 (0)