@@ -42,7 +42,7 @@ trait SerializeDynamicField<'se> {
4242 T : serde:: ser:: Serialize + ?Sized ;
4343}
4444
45- impl < ' a , ' se > SerializeDynamicField < ' se > for & ' a mut Serializer < ' se > {
45+ impl < ' se > SerializeDynamicField < ' se > for & mut Serializer < ' se > {
4646 fn serialize_dynamic_field < T > ( & mut self , key : & ' se str , value : & T ) -> Result < ( ) , Error >
4747 where
4848 T : serde:: ser:: Serialize + ?Sized ,
@@ -56,7 +56,7 @@ impl<'a, 'se> SerializeDynamicField<'se> for &'a mut Serializer<'se> {
5656
5757 match matched_patch {
5858 Some ( data) => {
59- data. serialize ( & mut * * self ) ;
59+ data. serialize ( self ) ;
6060 }
6161 None => {
6262 value. serialize ( & mut * * self ) ?;
@@ -89,7 +89,7 @@ impl<'a, 'se> SerializeDynamicField<'se> for &'a mut Serializer<'se> {
8989 }
9090}
9191
92- impl < ' a , ' se > serde:: ser:: SerializeMap for & ' a mut Serializer < ' se > {
92+ impl serde:: ser:: SerializeMap for & mut Serializer < ' _ > {
9393 type Ok = ( ) ;
9494 type Error = Error ;
9595
@@ -112,7 +112,7 @@ impl<'a, 'se> serde::ser::SerializeMap for &'a mut Serializer<'se> {
112112 }
113113}
114114
115- impl < ' a , ' se > serde:: ser:: SerializeStruct for & ' a mut Serializer < ' se > {
115+ impl serde:: ser:: SerializeStruct for & mut Serializer < ' _ > {
116116 type Ok = ( ) ;
117117 type Error = Error ;
118118
@@ -135,7 +135,7 @@ impl<'a, 'se> serde::ser::SerializeStruct for &'a mut Serializer<'se> {
135135 }
136136}
137137
138- impl < ' a , ' se > serde:: ser:: SerializeStructVariant for & ' a mut Serializer < ' se > {
138+ impl serde:: ser:: SerializeStructVariant for & mut Serializer < ' _ > {
139139 type Ok = ( ) ;
140140 type Error = Error ;
141141
@@ -151,7 +151,7 @@ impl<'a, 'se> serde::ser::SerializeStructVariant for &'a mut Serializer<'se> {
151151 }
152152}
153153
154- impl < ' a , ' se > serde:: ser:: SerializeSeq for & ' a mut Serializer < ' se > {
154+ impl serde:: ser:: SerializeSeq for & mut Serializer < ' _ > {
155155 type Ok = ( ) ;
156156 type Error = Error ;
157157 // TODO: make sure there are no node seq serialize over this function.
@@ -168,7 +168,7 @@ impl<'a, 'se> serde::ser::SerializeSeq for &'a mut Serializer<'se> {
168168 }
169169}
170170
171- impl < ' a , ' se > serde:: ser:: SerializeTuple for & ' a mut Serializer < ' se > {
171+ impl serde:: ser:: SerializeTuple for & mut Serializer < ' _ > {
172172 type Ok = ( ) ;
173173 type Error = Error ;
174174
@@ -185,7 +185,7 @@ impl<'a, 'se> serde::ser::SerializeTuple for &'a mut Serializer<'se> {
185185 }
186186}
187187
188- impl < ' a , ' se > serde:: ser:: SerializeTupleVariant for & ' a mut Serializer < ' se > {
188+ impl serde:: ser:: SerializeTupleVariant for & mut Serializer < ' _ > {
189189 type Ok = ( ) ;
190190 type Error = Error ;
191191
@@ -201,7 +201,7 @@ impl<'a, 'se> serde::ser::SerializeTupleVariant for &'a mut Serializer<'se> {
201201 }
202202}
203203
204- impl < ' a , ' se > serde:: ser:: SerializeTupleStruct for & ' a mut Serializer < ' se > {
204+ impl serde:: ser:: SerializeTupleStruct for & mut Serializer < ' _ > {
205205 type Ok = ( ) ;
206206 type Error = Error ;
207207
@@ -217,7 +217,7 @@ impl<'a, 'se> serde::ser::SerializeTupleStruct for &'a mut Serializer<'se> {
217217 }
218218}
219219
220- impl < ' a , ' se > serde:: ser:: Serializer for & ' a mut Serializer < ' se > {
220+ impl serde:: ser:: Serializer for & mut Serializer < ' _ > {
221221 type Ok = ( ) ;
222222 type Error = Error ;
223223 type SerializeSeq = Self ;
@@ -417,7 +417,7 @@ mod tests {
417417
418418 {
419419 let base = Base { hello : 0xdeedbeef } ;
420- crate :: ser:: to_dtb ( & base, & mut [ ] , & mut buf1) . unwrap ( ) ;
420+ crate :: ser:: to_dtb ( & base, & [ ] , & mut buf1) . unwrap ( ) ;
421421 }
422422 // TODO: check buf1 buf2
423423 }
@@ -439,7 +439,7 @@ mod tests {
439439 hello : 0xdeedbeef ,
440440 base1 : Base1 { hello : 0x10000001 } ,
441441 } ;
442- crate :: ser:: to_dtb ( & base, & mut [ ] , & mut buf1) . unwrap ( ) ;
442+ crate :: ser:: to_dtb ( & base, & [ ] , & mut buf1) . unwrap ( ) ;
443443 }
444444 // TODO: check buf1 buf2
445445 // println!("{:x?} {:x?}", buf1, buf2);
@@ -465,7 +465,7 @@ mod tests {
465465 hello : "Hello, World!" ,
466466 } ,
467467 } ;
468- crate :: ser:: to_dtb ( & base, & mut [ ] , & mut buf1) . unwrap ( ) ;
468+ crate :: ser:: to_dtb ( & base, & [ ] , & mut buf1) . unwrap ( ) ;
469469 }
470470 // TODO: check buf1 buf2
471471 // println!("{:x?} {:x?}", buf1, buf2);
@@ -539,7 +539,7 @@ mod tests {
539539 {
540540 let number = 0x55667788u32 ;
541541 let patch = crate :: ser:: patch:: Patch :: new ( "/hello" , & number as _ ) ;
542- let mut list = [ patch] ;
542+ let list = [ patch] ;
543543 let base = Base {
544544 hello : 0xdeedbeef ,
545545 base1 : Base1 {
@@ -548,7 +548,7 @@ mod tests {
548548 hello2 : 0x11223344 ,
549549 base2 : Base1 { hello : "Roger" } ,
550550 } ;
551- crate :: ser:: to_dtb ( & base, & mut list, & mut buf1) . unwrap ( ) ;
551+ crate :: ser:: to_dtb ( & base, & list, & mut buf1) . unwrap ( ) ;
552552 }
553553 // TODO: check buf1 buf2
554554 // println!("{:x?} {:x?}", buf1, buf2);
@@ -574,7 +574,7 @@ mod tests {
574574 hello : "replacement" ,
575575 } ;
576576 let patch = crate :: ser:: patch:: Patch :: new ( "/hello" , & new_base as _ ) ;
577- let mut list = [ patch] ;
577+ let list = [ patch] ;
578578 let base = Base {
579579 hello : 0xdeedbeef ,
580580 base1 : Base1 {
@@ -583,7 +583,7 @@ mod tests {
583583 hello2 : 0x11223344 ,
584584 base2 : Base1 { hello : "Roger" } ,
585585 } ;
586- crate :: ser:: to_dtb ( & base, & mut list, & mut buf1) . unwrap ( ) ;
586+ crate :: ser:: to_dtb ( & base, & list, & mut buf1) . unwrap ( ) ;
587587 }
588588 // TODO: check buf1 buf2
589589 // println!("{:x?} {:x?}", buf1, buf2);
@@ -607,7 +607,7 @@ mod tests {
607607 {
608608 let new_base = Base1 { hello : "added" } ;
609609 let patch = crate :: ser:: patch:: Patch :: new ( "/base3" , & new_base as _ ) ;
610- let mut list = [ patch] ;
610+ let list = [ patch] ;
611611 let base = Base {
612612 hello : 0xdeedbeef ,
613613 base1 : Base1 {
@@ -616,7 +616,7 @@ mod tests {
616616 hello2 : 0x11223344 ,
617617 base2 : Base1 { hello : "Roger" } ,
618618 } ;
619- crate :: ser:: to_dtb ( & base, & mut list, & mut buf1) . unwrap ( ) ;
619+ crate :: ser:: to_dtb ( & base, & list, & mut buf1) . unwrap ( ) ;
620620 }
621621 // TODO: check buf1 buf2
622622 // println!("{:x?}", buf1);
0 commit comments