Skip to content

Commit 27f8c46

Browse files
committed
fix clippy and doc test
Signed-off-by: Ruihang Xia <[email protected]>
1 parent 4fa363c commit 27f8c46

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

arrow-array/src/array/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ pub trait Array: std::fmt::Debug + Send + Sync {
351351
///
352352
/// # Example
353353
/// ```
354-
/// #use arrow_array::{Int32Array, Array};
355-
/// #use arrow_buffer::pool::TrackingMemoryPool;
354+
/// # use arrow_array::{Int32Array, Array};
355+
/// # use arrow_buffer::TrackingMemoryPool;
356356
///
357357
/// let array = Int32Array::from(vec![1, 2, 3, 4, 5]);
358358
/// let pool = TrackingMemoryPool::default();

arrow-data/src/data.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,7 @@ impl ArrayData {
15741574
}
15751575

15761576
/// Claim memory used by this ArrayData in the provided memory pool.
1577-
///
1577+
///
15781578
/// This claims memory for:
15791579
/// - All buffers in self.buffers
15801580
/// - All child ArrayData recursively
@@ -1585,12 +1585,12 @@ impl ArrayData {
15851585
for buffer in &self.buffers {
15861586
buffer.claim(pool);
15871587
}
1588-
1588+
15891589
// Claim null buffer if present
15901590
if let Some(nulls) = &self.nulls {
15911591
nulls.claim(pool);
15921592
}
1593-
1593+
15941594
// Recursively claim child data
15951595
for child in &self.child_data {
15961596
child.claim(pool);

arrow/examples/memory_tracking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn main() {
4747
let large_array = Int32Array::from((0..1000).collect::<Vec<i32>>());
4848
large_array.claim(&pool);
4949
let original_usage = pool.used();
50-
println!("Original array (1000 elements): {} bytes", original_usage);
50+
println!("Original array (1000 elements): {original_usage} bytes");
5151

5252
// Create and claim slices - should not increase memory usage
5353
let slice1 = large_array.slice(0, 100);
@@ -57,7 +57,7 @@ fn main() {
5757
slice2.claim(&pool);
5858
let final_usage = pool.used();
5959

60-
println!("After claiming 2 slices: {} bytes", final_usage);
60+
println!("After claiming 2 slices: {final_usage} bytes");
6161
println!(
6262
"Increase: {} bytes (slices share the same buffer!)",
6363
final_usage - original_usage

0 commit comments

Comments
 (0)