File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,34 +132,6 @@ func Test_decodeState_decodeSlice(t *testing.T) {
132132 }
133133}
134134
135- // // Rust code to encode a map of string to struct.
136- // let mut btree_map: BTreeMap<String, User> = BTreeMap::new();
137- // match btree_map.entry("string1".to_string()) {
138- // Entry::Vacant(entry) => {
139- // entry.insert(User{
140- // active: true,
141- // username: "lorem".to_string(),
142- // email: "lorem@ipsum.org".to_string(),
143- // sign_in_count: 1,
144- // });
145- // ()
146- // },
147- // Entry::Occupied(_) => (),
148- // }
149- // match btree_map.entry("string2".to_string()) {
150- // Entry::Vacant(entry) => {
151- // entry.insert(User{
152- // active: false,
153- // username: "john".to_string(),
154- // email: "jack@gmail.com".to_string(),
155- // sign_in_count: 73,
156- // });
157- // ()
158- // },
159- // Entry::Occupied(_) => (),
160- // }
161- // println!("{:?}", btree_map.encode());
162-
163135type user struct {
164136 Active bool
165137 Username string
You can’t perform that action at this time.
0 commit comments