File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1307,14 +1307,14 @@ impl<'de> serde::de::Deserializer<'de> for &mut RegexAccess<'de> {
13071307 self . stage = RegexDeserializationStage :: Options ;
13081308 match & self . re {
13091309 BsonCow :: Borrowed ( re) => visitor. visit_borrowed_str ( re. pattern . as_str ( ) ) ,
1310- BsonCow :: Owned ( re) => visitor. visit_str ( & re. pattern . as_str ( ) ) ,
1310+ BsonCow :: Owned ( re) => visitor. visit_str ( re. pattern . as_str ( ) ) ,
13111311 }
13121312 }
13131313 RegexDeserializationStage :: Options => {
13141314 self . stage = RegexDeserializationStage :: Done ;
13151315 match & self . re {
13161316 BsonCow :: Borrowed ( re) => visitor. visit_borrowed_str ( re. options . as_str ( ) ) ,
1317- BsonCow :: Owned ( re) => visitor. visit_str ( & re. options . as_str ( ) ) ,
1317+ BsonCow :: Owned ( re) => visitor. visit_str ( re. options . as_str ( ) ) ,
13181318 }
13191319 }
13201320 RegexDeserializationStage :: Done => {
Original file line number Diff line number Diff line change @@ -39,13 +39,17 @@ impl CStr {
3939 self . as_str ( ) . len ( )
4040 }
4141
42+ pub fn is_empty ( & self ) -> bool {
43+ self . as_str ( ) . is_empty ( )
44+ }
45+
4246 pub ( crate ) fn append_to ( & self , buf : & mut Vec < u8 > ) {
4347 buf. extend ( & self . data ) ;
4448 buf. push ( 0 ) ;
4549 }
4650}
4751
48- impl < ' a , ' b > PartialEq < & ' b CStr > for & ' a CStr {
52+ impl PartialEq < & CStr > for & CStr {
4953 fn eq ( & self , other : & & CStr ) -> bool {
5054 self . as_str ( ) == other. as_str ( )
5155 }
You can’t perform that action at this time.
0 commit comments