From 8553c193d94d208abe0a5023b330e31bf27e4e9b Mon Sep 17 00:00:00 2001 From: tycho garen Date: Mon, 26 Feb 2024 18:09:38 -0500 Subject: [PATCH 1/5] fix: export RawElement type --- src/raw/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raw/mod.rs b/src/raw/mod.rs index 56c6e130..8a503634 100644 --- a/src/raw/mod.rs +++ b/src/raw/mod.rs @@ -142,7 +142,7 @@ pub use self::{ document::RawDocument, document_buf::RawDocumentBuf, error::{Error, ErrorKind, Result, ValueAccessError, ValueAccessErrorKind, ValueAccessResult}, - iter::RawIter, + iter::{RawElement, RawIter}, }; /// Special newtype name indicating that the type being (de)serialized is a raw BSON document. From fe4239a1007ed743aa9421117227175b77612c14 Mon Sep 17 00:00:00 2001 From: tycho garen Date: Wed, 28 Feb 2024 08:25:42 -0500 Subject: [PATCH 2/5] fix lint --- src/raw/iter.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/raw/iter.rs b/src/raw/iter.rs index 1208b7ee..2592a2b9 100644 --- a/src/raw/iter.rs +++ b/src/raw/iter.rs @@ -145,6 +145,10 @@ impl<'a> TryInto for RawElement<'a> { } impl<'a> RawElement<'a> { + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + pub fn len(&self) -> usize { self.size } From 747a7efe6fd617ae01ec926dd4ba5f95f96af0bf Mon Sep 17 00:00:00 2001 From: tycho garen Date: Fri, 1 Mar 2024 15:38:19 -0500 Subject: [PATCH 3/5] bump --- src/raw/iter.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/raw/iter.rs b/src/raw/iter.rs index 2592a2b9..876cda48 100644 --- a/src/raw/iter.rs +++ b/src/raw/iter.rs @@ -145,11 +145,7 @@ impl<'a> TryInto for RawElement<'a> { } impl<'a> RawElement<'a> { - pub fn is_empty(&self) -> bool { - self.len() == 0 - } - - pub fn len(&self) -> usize { + pub fn size(&self) -> usize { self.size } From ccf7e04fe0e91987fc65fcabe1ea399d3b6bd989 Mon Sep 17 00:00:00 2001 From: tycho garen Date: Fri, 1 Mar 2024 18:16:28 -0500 Subject: [PATCH 4/5] Revert "bump" This reverts commit 747a7efe6fd617ae01ec926dd4ba5f95f96af0bf. --- src/raw/iter.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/raw/iter.rs b/src/raw/iter.rs index 876cda48..2592a2b9 100644 --- a/src/raw/iter.rs +++ b/src/raw/iter.rs @@ -145,7 +145,11 @@ impl<'a> TryInto for RawElement<'a> { } impl<'a> RawElement<'a> { - pub fn size(&self) -> usize { + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + + pub fn len(&self) -> usize { self.size } From 03723f07810be309f206895e4581dd1ef8c7cb9b Mon Sep 17 00:00:00 2001 From: tycho garen Date: Fri, 1 Mar 2024 18:17:59 -0500 Subject: [PATCH 5/5] fixup --- src/raw/iter.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/raw/iter.rs b/src/raw/iter.rs index 2592a2b9..9180df7a 100644 --- a/src/raw/iter.rs +++ b/src/raw/iter.rs @@ -144,11 +144,8 @@ impl<'a> TryInto for RawElement<'a> { } } +#[allow(clippy::len_without_is_empty)] impl<'a> RawElement<'a> { - pub fn is_empty(&self) -> bool { - self.len() == 0 - } - pub fn len(&self) -> usize { self.size }