Skip to content

Commit affe749

Browse files
committed
update for error changes
1 parent a70c452 commit affe749

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/raw/document.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,13 +514,13 @@ impl RawDocument {
514514
}
515515

516516
/// Copy this into a [`Document`], returning an error if invalid BSON is encountered.
517-
pub fn to_document(&self) -> Result<Document> {
517+
pub fn to_document(&self) -> RawResult<Document> {
518518
self.try_into()
519519
}
520520

521521
/// Copy this into a [`Document`], returning an error if invalid BSON is encountered. Any
522522
/// invalid UTF-8 sequences will be replaced with the Unicode replacement character.
523-
pub fn to_document_utf8_lossy(&self) -> Result<Document> {
523+
pub fn to_document_utf8_lossy(&self) -> RawResult<Document> {
524524
let mut out = Document::new();
525525
for elem in self.iter_elements() {
526526
let elem = elem?;
@@ -531,7 +531,7 @@ impl RawDocument {
531531
}
532532
}
533533

534-
fn deep_utf8_lossy(src: RawBson) -> Result<Bson> {
534+
fn deep_utf8_lossy(src: RawBson) -> RawResult<Bson> {
535535
match src {
536536
RawBson::Array(arr) => {
537537
let mut tmp = vec![];

0 commit comments

Comments
 (0)