From e477f18fe991768fa6e12af1f22e4f6631cadee0 Mon Sep 17 00:00:00 2001 From: "anmol.singh" Date: Sun, 8 Sep 2024 09:33:56 -0700 Subject: [PATCH] format rust code Signed-off-by: anmol.singh --- src/daft-scan/src/glob.rs | 8 ++++++-- src/daft-scan/src/lib.rs | 9 +++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/daft-scan/src/glob.rs b/src/daft-scan/src/glob.rs index 07f912d511..20e8754f66 100644 --- a/src/daft-scan/src/glob.rs +++ b/src/daft-scan/src/glob.rs @@ -276,7 +276,12 @@ impl ScanOperator for GlobScanOperator { self.glob_paths.join(", ") } else { let first_three: Vec = self.glob_paths.iter().take(3).cloned().collect(); - let last_three: Vec = self.glob_paths.iter().skip(self.glob_paths.len() - 3).cloned().collect(); + let last_three: Vec = self + .glob_paths + .iter() + .skip(self.glob_paths.len() - 3) + .cloned() + .collect(); let mut result = first_three.join(", "); result.push_str(", ..."); @@ -284,7 +289,6 @@ impl ScanOperator for GlobScanOperator { result.push_str(&last_three.join(", ")); result - }; let mut lines = vec![ diff --git a/src/daft-scan/src/lib.rs b/src/daft-scan/src/lib.rs index 4adf2f06e2..42d1334b4a 100644 --- a/src/daft-scan/src/lib.rs +++ b/src/daft-scan/src/lib.rs @@ -966,7 +966,10 @@ mod test { use itertools::Itertools; use crate::{ - file_format::{FileFormatConfig, ParquetSourceConfig}, glob::GlobScanOperator, storage_config::{NativeStorageConfig, StorageConfig}, DataSource, Pushdowns, ScanOperator, ScanTask + file_format::{FileFormatConfig, ParquetSourceConfig}, + glob::GlobScanOperator, + storage_config::{NativeStorageConfig, StorageConfig}, + DataSource, Pushdowns, ScanOperator, ScanTask, }; fn make_scan_task(num_sources: usize) -> ScanTask { @@ -1010,11 +1013,10 @@ mod test { }); let mut sources: Vec = Vec::new(); - + for _ in 0..num_sources { sources.push(format!("../../tests/assets/parquet-data/mvp.parquet")); // sources.push(format!("File {}", i + 1)); - } let glob_paths: Vec<&str> = sources.iter().map(|s| s.as_str()).collect(); @@ -1031,7 +1033,6 @@ mod test { .unwrap(); glob_scan_operator - } #[test]