Skip to content

Commit 83066a6

Browse files
committed
luau: minor tweaks
- set TIMEOUT_SECS to 30, aligned with docopt default of 30, which overrides it anyway - explicitly flush and close qsv_register_lookup cache file - remove unused assignment
1 parent 2b72cfd commit 83066a6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cmd/luau.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ impl TryFrom<i8> for Stage {
315315

316316
static LUAU_STAGE: AtomicI8 = AtomicI8::new(0);
317317

318-
static TIMEOUT_SECS: AtomicU16 = AtomicU16::new(15);
318+
static TIMEOUT_SECS: AtomicU16 = AtomicU16::new(30);
319319

320320
pub fn run(argv: &[&str]) -> CliResult<()> {
321321
let args: Args = util::get_args(USAGE, argv)?;
@@ -2297,16 +2297,18 @@ fn setup_helpers(
22972297
let download_elapsed = download_start.elapsed().as_millis();
22982298
writeln!(cache_file, "# Download-duration-ms: {download_elapsed}")?;
22992299
cache_file.write_all(lookup_csv_contents.as_bytes())?;
2300+
2301+
// explicitly flush and close the file
23002302
cache_file.flush()?;
2303+
drop(cache_file);
23012304
}
23022305

23032306
lookup_table_uri = cache_file_path.to_string_lossy().to_string();
23042307
}
23052308
}
23062309

23072310
let lookup_table = luau.create_table()?;
2308-
#[allow(unused_assignments)]
2309-
let mut record = csv::StringRecord::new();
2311+
let mut record: csv::StringRecord;
23102312

23112313
let conf = Config::new(&Some(lookup_table_uri.clone()))
23122314
.delimiter(delimiter)

0 commit comments

Comments
 (0)