Skip to content

Commit 6930185

Browse files
committed
update for error changes
1 parent 062e159 commit 6930185

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
@@ -529,13 +529,13 @@ impl RawDocument {
529529
}
530530

531531
/// Copy this into a [`Document`], returning an error if invalid BSON is encountered.
532-
pub fn to_document(&self) -> Result<Document> {
532+
pub fn to_document(&self) -> RawResult<Document> {
533533
self.try_into()
534534
}
535535

536536
/// Copy this into a [`Document`], returning an error if invalid BSON is encountered. Any
537537
/// invalid UTF-8 sequences will be replaced with the Unicode replacement character.
538-
pub fn to_document_utf8_lossy(&self) -> Result<Document> {
538+
pub fn to_document_utf8_lossy(&self) -> RawResult<Document> {
539539
let mut out = Document::new();
540540
for elem in self.iter_elements() {
541541
let elem = elem?;
@@ -546,7 +546,7 @@ impl RawDocument {
546546
}
547547
}
548548

549-
fn deep_utf8_lossy(src: RawBson) -> Result<Bson> {
549+
fn deep_utf8_lossy(src: RawBson) -> RawResult<Bson> {
550550
match src {
551551
RawBson::Array(arr) => {
552552
let mut tmp = vec![];

0 commit comments

Comments
 (0)