diff options
Diffstat (limited to 'src/pattern.rs')
-rw-r--r-- | src/pattern.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pattern.rs b/src/pattern.rs index 2f7166a..6286ff9 100644 --- a/src/pattern.rs +++ b/src/pattern.rs @@ -56,8 +56,8 @@ impl<O: Serialize> Pattern<O> { ).deserialize(der)?; // this should always be None debug_assert!(obj.is_none()); - debug_assert!(packs.len() == 1); - let pack = packs.pop().unwrap(); + debug_assert!(packs.len() <= 1); + let pack = packs.pop().unwrap_or_else(Default::default); let de = De::deserialize(vm::Unpacker::new(pack, MAX_CALLS)); todo!() } |