Skip to content

Commit 767cda6

Browse files
authored
minor: fix readme example using private function (#242)
1 parent b069ef5 commit 767cda6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ BSON documents are ordered maps of UTF-8 encoded strings to BSON values. They ar
107107
reader containing BSON data or via the `doc!` macro:
108108
```rust
109109
let mut bytes = hex::decode("0C0000001069000100000000").unwrap();
110-
let doc = Document::decode(&mut bytes.as_slice()).unwrap(); // { "i": 1 }
110+
let doc = Document::from_reader(&mut bytes.as_slice()).unwrap(); // { "i": 1 }
111111

112112
let doc = doc! {
113113
"hello": "world",

0 commit comments

Comments
 (0)