Skip to content

Commit 3fe1baf

Browse files
committed
Adapt test & docs
1 parent 20bf843 commit 3fe1baf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

datafusion/common/src/heap_size.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ impl DFHeapSize for String {
397397

398398
impl DFHeapSize for str {
399399
fn heap_size(&self, _: &mut DFHeapSizeCtx) -> usize {
400+
// Internal accounting helper for owners like Arc<str>
400401
self.len()
401402
}
402403
}
@@ -631,10 +632,9 @@ mod tests {
631632
}
632633

633634
#[test]
634-
fn test_str() {
635-
let s: &str = "hello";
636-
assert!(size(s) > 0);
637-
assert_eq!(size(""), 0);
635+
fn test_owned_str() {
636+
let a: Arc<str> = Arc::from("Hello");
637+
assert!(size(&a) > 0);
638638
}
639639

640640
#[test]

0 commit comments

Comments
 (0)