From a74145961e8a8674b30ae973babb5bdf61616a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Sun, 24 Nov 2019 01:25:41 -0500 Subject: [PATCH] Always check the row's columns. --- src/commands/compact.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/commands/compact.rs b/src/commands/compact.rs index be18b8ce42..ab0c96ba41 100644 --- a/src/commands/compact.rs +++ b/src/commands/compact.rs @@ -41,9 +41,15 @@ pub fn compact( let keep = if columns.is_empty() { item.is_some() } else { - columns - .iter() - .all(|field| item.get_data(field).borrow().is_some()) + match item { + Tagged { + item: Value::Row(ref r), + .. + } => columns + .iter() + .all(|field| r.get_data(field).borrow().is_some()), + _ => false, + } }; futures::future::ready(keep)