We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c50c661 commit 4459ca0Copy full SHA for 4459ca0
src/raw/document_buf.rs
@@ -114,7 +114,7 @@ impl RawDocumentBuf {
114
/// let doc = RawDocumentBuf::from_document(&document)?;
115
/// # Ok::<(), bson::error::Error>(())
116
/// ```
117
- pub fn from_document(doc: &Document) -> Result<Self> {
+ pub fn from_document(doc: impl Borrow<Document>) -> Result<Self> {
118
let mut out = RawDocumentBuf::new();
119
for (k, v) in doc {
120
let val: RawBson = v.clone().try_into()?;
0 commit comments