From 85c1e422c2e0e3a989156f2b134d868e4e9b1756 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Wed, 1 Nov 2023 08:52:07 -0400 Subject: [PATCH] `luau`: use `clear()` instead of `raw_set()` to empty Luau table --- src/cmd/luau.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/luau.rs b/src/cmd/luau.rs index 405ea6617..bf96fc2b4 100644 --- a/src/cmd/luau.rs +++ b/src/cmd/luau.rs @@ -794,7 +794,7 @@ fn sequential_mode( wtr.write_record(&record)?; } wtr.write_record(&insertrecord)?; - luau.globals().raw_set("_QSV_INSERTRECORD_TBL", "")?; // empty the table + insertrecord_table.clear()?; }, Ok(_) | Err(_) => { if QSV_SKIP.load(Ordering::Relaxed) { @@ -1135,7 +1135,7 @@ fn random_access_mode( wtr.write_record(&record)?; } wtr.write_record(&insertrecord)?; - luau.globals().raw_set("_QSV_INSERTRECORD_TBL", "")?; // empty the table + insertrecord_table.clear()?; }, Ok(_) | Err(_) => { if QSV_SKIP.load(Ordering::Relaxed) { @@ -1363,7 +1363,7 @@ fn beginend_insertrecord( create_insertrecord(&insertrecord_table, insertrecord, headers_count)?; wtr.write_record(&*insertrecord)?; - luau.globals().raw_set("_QSV_INSERTRECORD_TBL", "")?; // empty the table + insertrecord_table.clear()?; }, Ok(_) | Err(_) => {}, }