diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-10-30 21:27:29 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-10-30 21:27:29 -0300 |
commit | 6fac8900d19b9406229e5bf2b36fbfbbdfe548d4 (patch) | |
tree | 8f6b9c258c6097e3f855b211962f933448d5c18d /src | |
parent | 477a1fd5ea7603dd261bcfef9cd443f98310e5db (diff) |
Clean up
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/de.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/vm/de.rs b/src/vm/de.rs index dc3e9b3..471b541 100644 --- a/src/vm/de.rs +++ b/src/vm/de.rs @@ -196,7 +196,6 @@ impl<'pat, 'state, 'de, O: Serialize> Packer<'pat, 'state, O> { // iterate backwards let index = orig_len - index - 1; let frame = &mut self.interp.frames[index]; - dbg!(index); let has_pack = frame.matches; if frame.overstep > 0 { // handle overstep @@ -843,10 +842,8 @@ where } } let obj = SerdeObject::Map(obj_inner); - dbg!(&self.interp.frames); let mut final_packs = self.step_out(output_packs); let mut iter_final_packs = 0..; - dbg!(&self.interp.frames); self.frames_mut().iter_active_mut().for_each(|frame| { let ty = frame.get_type(); match ty { @@ -1245,7 +1242,7 @@ mod tests { MAX_CALLS, ).deserialize(&mut der).unwrap(); assert!(obj.is_none()); - assert!(packs.len() == 1); + assert_eq!(packs.len(), 1); let pack = packs.pop().unwrap(); assert!(pack.subpacks.is_empty()); } @@ -1284,9 +1281,9 @@ mod tests { ).deserialize(&mut der); let (mut packs, obj) = result.unwrap(); assert!(obj.is_none()); - assert!(packs.len() == 1); + assert_eq!(packs.len(), 1); let pack = packs.pop().unwrap(); - assert!(pack.subpacks.len() == 2); + assert_eq!(pack.subpacks.len(), 2); } #[test] @@ -1323,9 +1320,9 @@ mod tests { ).deserialize(&mut der); let (mut packs, obj) = result.unwrap(); assert!(obj.is_none()); - assert!(packs.len() == 1); + assert_eq!(packs.len(), 1); let pack = packs.pop().unwrap(); - assert!(pack.subpacks.len() == 2); + assert_eq!(pack.subpacks.len(), 2); } #[test] @@ -1362,9 +1359,11 @@ mod tests { ).deserialize(&mut der); let (mut packs, obj) = result.unwrap(); assert!(obj.is_none()); - assert!(packs.len() == 1); + assert_eq!(packs.len(), 1); let pack = packs.pop().unwrap(); - assert!(pack.subpacks.len() == 2); + assert_eq!(pack.subpacks.len(), 2); + assert_eq!(pack.subpacks[0]["name"].1, SerdeObject::Str(From::from("a"))); + assert_eq!(pack.subpacks[1]["value"].1, SerdeObject::U32(1)); } } |