Skip to content

Commit 3854435

Browse files
committed
fix subcrates
1 parent b518637 commit 3854435

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

fuzz/fuzz_targets/raw_deserialize_utf8_lossy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
#[macro_use]
33
extern crate libfuzzer_sys;
44
extern crate bson;
5-
use bson::{serde_helpers::Utf8LossyDeserialization, Document};
5+
use bson::{Document, Utf8Lossy};
66

77
fuzz_target!(|buf: &[u8]| {
8-
if let Ok(doc) = bson::deserialize_from_slice::<Utf8LossyDeserialization<Document>>(buf) {
8+
if let Ok(doc) = bson::deserialize_from_slice::<Utf8Lossy<Document>>(buf) {
99
let _ = bson::serialize_to_vec(&doc.0);
1010
}
1111
});

serde-tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use bson::{
2121
cstr,
2222
doc,
2323
oid::ObjectId,
24-
serde_helpers::Utf8LossyDeserialization,
2524
spec::BinarySubtype,
2625
Binary,
2726
Bson,
@@ -43,6 +42,7 @@ use bson::{
4342
RawRegexRef,
4443
Regex,
4544
Timestamp,
45+
Utf8Lossy,
4646
Uuid,
4747
};
4848

@@ -1336,5 +1336,5 @@ fn invalid_length() {
13361336
fn code_with_scope_too_long() {
13371337
// This is a regression test for fuzzer-generated input (RUST-2241).
13381338
let bytes = base64::decode("KAAAAAsBCRwPAAAACwFAAAAEAA8AEAAAAAYAAAAA9wD5/wAABgALAA==").unwrap();
1339-
assert!(bson::deserialize_from_slice::<Utf8LossyDeserialization<Document>>(&bytes).is_err());
1339+
assert!(bson::deserialize_from_slice::<Utf8Lossy<Document>>(&bytes).is_err());
13401340
}

0 commit comments

Comments
 (0)