File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ pub struct SimpleKVSerializer {
99 kvs : Vec < ( String , String ) > ,
1010}
1111
12+ impl Default for SimpleKVSerializer {
13+ fn default ( ) -> Self {
14+ Self :: new ( )
15+ }
16+ }
17+
1218impl SimpleKVSerializer {
1319 pub fn new ( ) -> Self {
1420 Self { kvs : Vec :: new ( ) }
@@ -39,6 +45,12 @@ pub struct VecKVSerializer {
3945 kvs : Vec < ( String , String ) > ,
4046}
4147
48+ impl Default for VecKVSerializer {
49+ fn default ( ) -> Self {
50+ Self :: new ( )
51+ }
52+ }
53+
4254impl VecKVSerializer {
4355 pub fn new ( ) -> Self {
4456 Self { kvs : Vec :: new ( ) }
@@ -61,6 +73,12 @@ pub struct HashMapKVSerializer {
6173 kvs : Vec < ( String , String ) > ,
6274}
6375
76+ impl Default for HashMapKVSerializer {
77+ fn default ( ) -> Self {
78+ Self :: new ( )
79+ }
80+ }
81+
6482impl HashMapKVSerializer {
6583 pub fn new ( ) -> Self {
6684 HashMapKVSerializer { kvs : Vec :: new ( ) }
You can’t perform that action at this time.
0 commit comments