From 73aef28d7566a0478cee0779132c06a2c8f2833d Mon Sep 17 00:00:00 2001 From: amtoine Date: Sun, 14 Jul 2024 11:50:37 +0200 Subject: [PATCH] don't check types for "loosy" tables --- src/nu/value.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/nu/value.rs b/src/nu/value.rs index 15dcd64..e574d0a 100644 --- a/src/nu/value.rs +++ b/src/nu/value.rs @@ -145,10 +145,6 @@ pub(crate) fn is_table(value: &Value, loose: bool) -> Table { }; } - if loose { - return Table::IsValid; - } - // check the number of columns for each row let n = rows[0].keys().len(); for (i, row) in rows.iter().skip(1).enumerate() { @@ -168,6 +164,9 @@ pub(crate) fn is_table(value: &Value, loose: bool) -> Table { Some(v) => match ty { Type::Nothing => ty = v, _ => { + if loose { + continue; + } if !matches!(v, Type::Nothing) { if v.is_numeric() && ty.is_numeric() { } else if (!v.is_numeric() && ty.is_numeric())