Skip to content

Commit 8e72ad8

Browse files
adriangbclaude
andcommitted
test: import std::fs::File to drop fs::File:: prefix in tests
Addresses review feedback on PR #21965. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent f484851 commit 8e72ad8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎datafusion/core/src/datasource/listing_table_factory.rs‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ mod tests {
237237
use glob::Pattern;
238238
use std::collections::HashMap;
239239
use std::fs;
240+
use std::fs::File;
240241
use std::path::PathBuf;
241242

242243
use datafusion_common::parsers::CompressionTypeVariant;
@@ -312,7 +313,7 @@ mod tests {
312313
// Schema inference now requires at least one file at the location.
313314
// The file itself can be 0-byte — it will be filtered out before the
314315
// format-specific inference runs, leaving an empty inferred schema.
315-
fs::File::create_new(dir.path().join("placeholder.csv.gz")).unwrap();
316+
File::create_new(dir.path().join("placeholder.csv.gz")).unwrap();
316317

317318
let factory = ListingTableFactory::new();
318319
let context = SessionContext::new();
@@ -357,7 +358,7 @@ mod tests {
357358
let dir = tempfile::tempdir().unwrap();
358359
// See `test_create_using_folder_with_compression` — a placeholder file
359360
// is required so schema inference does not error on an empty location.
360-
fs::File::create_new(dir.path().join("placeholder.csv")).unwrap();
361+
File::create_new(dir.path().join("placeholder.csv")).unwrap();
361362

362363
let factory = ListingTableFactory::new();
363364
let context = SessionContext::new();
@@ -395,7 +396,7 @@ mod tests {
395396
path.extend(["odd.v1", "odd.v2"]);
396397
fs::create_dir_all(&path).unwrap();
397398
// Placeholder so schema inference does not error on an empty location.
398-
fs::File::create_new(path.join("placeholder.parquet")).unwrap();
399+
File::create_new(path.join("placeholder.parquet")).unwrap();
399400

400401
let factory = ListingTableFactory::new();
401402
let context = SessionContext::new();
@@ -423,7 +424,7 @@ mod tests {
423424
path.extend(["key1=value1", "key2=value2"]);
424425
fs::create_dir_all(&path).unwrap();
425426
path.push("data.parquet");
426-
fs::File::create_new(&path).unwrap();
427+
File::create_new(&path).unwrap();
427428

428429
let factory = ListingTableFactory::new();
429430
let context = SessionContext::new();

0 commit comments

Comments
 (0)