Skip to content

Commit 8cf30d6

Browse files
Update src/raw/document_buf.rs
Co-authored-by: Isabel Atkinson <[email protected]>
1 parent dd031cb commit 8cf30d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/raw/document_buf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl RawDocumentBuf {
114114
/// let doc = RawDocumentBuf::from_document(&document)?;
115115
/// # Ok::<(), bson::error::Error>(())
116116
/// ```
117-
pub fn from_document(doc: &Document) -> Result<Self> {
117+
pub fn from_document(doc: impl Borrow<Document>) -> Result<Self> {
118118
let mut out = RawDocumentBuf::new();
119119
for (k, v) in doc {
120120
let val: RawBson = v.clone().try_into()?;

0 commit comments

Comments
 (0)