Skip to content

Commit 916e43f

Browse files
committed
Fix fmt
1 parent bab3590 commit 916e43f

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

datafusion/common/src/heap_size.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ use arrow::datatypes::{
2626
};
2727
use chrono::{DateTime, Utc};
2828
use half::f16;
29+
use object_store::path::Path;
2930
use std::collections::HashMap;
3031
use std::fmt::Debug;
3132
use std::sync::Arc;
32-
use object_store::path::Path;
3333

3434
/// This is a temporary solution until <https://github.com/apache/datafusion/pull/19599> and
3535
/// <https://github.com/apache/arrow-rs/pull/9138> are resolved.
@@ -182,7 +182,7 @@ impl DFHeapSize for DataType {
182182

183183
impl DFHeapSize for Path {
184184
fn heap_size(&self) -> usize {
185-
self.as_ref().heap_size()
185+
self.as_ref().heap_size()
186186
}
187187
}
188188

datafusion/execution/src/cache/cache_unit.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
// under the License.
1717

1818
use crate::cache::CacheAccessor;
19-
use crate::cache::cache_manager::{CachedFileMetadata, FileMetadataCache, FileStatisticsCache, FileStatisticsCacheEntry};
19+
use crate::cache::cache_manager::{
20+
CachedFileMetadata, FileMetadataCache, FileStatisticsCache, FileStatisticsCacheEntry,
21+
};
22+
use object_store::path::Path;
2023
use std::collections::HashMap;
2124
use std::sync::Mutex;
2225

2326
pub use crate::cache::DefaultFilesMetadataCache;
2427
use crate::cache::lru_queue::LruQueue;
2528
use datafusion_common::heap_size::DFHeapSize;
26-
use object_store::path::Path;
2729

2830
/// Default implementation of [`FileStatisticsCache`]
2931
///
@@ -550,7 +552,10 @@ mod tests {
550552
let (meta_2, value_2) = create_cached_file_metadata_with_stats("test2.parquet");
551553
let (meta_3, value_3) = create_cached_file_metadata_with_stats("test3.parquet");
552554

553-
let limit_for_2_entries = &meta_1.location.heap_size() + value_1.heap_size() + &meta_2.location.heap_size() + value_2.heap_size();
555+
let limit_for_2_entries = &meta_1.location.heap_size()
556+
+ value_1.heap_size()
557+
+ &meta_2.location.heap_size()
558+
+ value_2.heap_size();
554559

555560
// create a cache with a limit which fits exactly 2 entries
556561
let cache = DefaultFileStatisticsCache::new(limit_for_2_entries);
@@ -582,7 +587,10 @@ mod tests {
582587

583588
cache.remove(&meta_2.location);
584589
assert_eq!(cache.len(), 1);
585-
assert_eq!(cache.memory_used(), &meta_3.location.heap_size() + value_3.heap_size());
590+
assert_eq!(
591+
cache.memory_used(),
592+
&meta_3.location.heap_size() + value_3.heap_size()
593+
);
586594

587595
cache.clear();
588596
assert_eq!(cache.len(), 0);

0 commit comments

Comments
 (0)