Skip to content

Commit d69371d

Browse files
committed
Revert "remove commented Rust code."
This reverts commit ec37a64.
1 parent ec37a64 commit d69371d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

pkg/scale/decode_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,34 @@ 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: "[email protected]".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: "[email protected]".to_string(),
155+
// sign_in_count: 73,
156+
// });
157+
// ()
158+
// },
159+
// Entry::Occupied(_) => (),
160+
// }
161+
// println!("{:?}", btree_map.encode());
162+
135163
type user struct {
136164
Active bool
137165
Username string

0 commit comments

Comments
 (0)