This is an automated email from the ASF dual-hosted git repository.

jeffreyvo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 843bee2c21 Fix headers and empty lines in code examples (#9064)
843bee2c21 is described below

commit 843bee2c21dbe40a228c37dae7ecd876d73ee5de
Author: Eduard Akhmetshin <[email protected]>
AuthorDate: Wed Dec 31 01:13:19 2025 +0000

    Fix headers and empty lines in code examples (#9064)
    
    # Which issue does this PR close?
    
    - Closes https://github.com/apache/arrow-rs/issues/9063.
    
    # What changes are included in this PR?
    
    Fixed exaxmple headers and removes empty first lines
    
    # Are these changes tested?
    
    Yes
    
    # Are there any user-facing changes?
    
    Yes, the following doc pages will be updated:
    https://docs.rs/arrow/latest/arrow/compute/fn.min_boolean.html
    https://docs.rs/arrow/latest/arrow/compute/fn.max_boolean.html
    https://docs.rs/arrow/latest/arrow/compute/fn.lexsort.html
    https://docs.rs/arrow/latest/arrow/compute/fn.take_record_batch.html
    https://docs.rs/arrow/latest/arrow/compute/fn.shift.html
---
 arrow-arith/src/aggregate.rs | 4 ++--
 arrow-ord/src/sort.rs        | 3 +--
 arrow-select/src/take.rs     | 1 -
 arrow-select/src/window.rs   | 1 -
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arrow-arith/src/aggregate.rs b/arrow-arith/src/aggregate.rs
index 0fbddbc6e6..a043259694 100644
--- a/arrow-arith/src/aggregate.rs
+++ b/arrow-arith/src/aggregate.rs
@@ -332,10 +332,10 @@ fn aggregate<T: ArrowNativeTypeOp, P: 
ArrowPrimitiveType<Native = T>, A: Numeric
 
 /// Returns the minimum value in the boolean array.
 ///
+/// # Example
 /// ```
 /// # use arrow_array::BooleanArray;
 /// # use arrow_arith::aggregate::min_boolean;
-///
 /// let a = BooleanArray::from(vec![Some(true), None, Some(false)]);
 /// assert_eq!(min_boolean(&a), Some(false))
 /// ```
@@ -390,10 +390,10 @@ pub fn min_boolean(array: &BooleanArray) -> Option<bool> {
 
 /// Returns the maximum value in the boolean array
 ///
+/// # Example
 /// ```
 /// # use arrow_array::BooleanArray;
 /// # use arrow_arith::aggregate::max_boolean;
-///
 /// let a = BooleanArray::from(vec![Some(true), None, Some(false)]);
 /// assert_eq!(max_boolean(&a), Some(true))
 /// ```
diff --git a/arrow-ord/src/sort.rs b/arrow-ord/src/sort.rs
index fdedbbcae9..39d56f8fe9 100644
--- a/arrow-ord/src/sort.rs
+++ b/arrow-ord/src/sort.rs
@@ -846,7 +846,7 @@ pub struct SortColumn {
 /// Returns an `ArrowError::ComputeError(String)` if any of the array type is 
either unsupported by
 /// `lexsort_to_indices` or `take`.
 ///
-/// Example:
+/// # Example:
 ///
 /// ```
 /// # use std::convert::From;
@@ -855,7 +855,6 @@ pub struct SortColumn {
 /// # use arrow_array::types::Int64Type;
 /// # use arrow_array::cast::AsArray;
 /// # use arrow_ord::sort::{SortColumn, SortOptions, lexsort};
-///
 /// let sorted_columns = lexsort(&vec![
 ///     SortColumn {
 ///         values: Arc::new(PrimitiveArray::<Int64Type>::from(vec![
diff --git a/arrow-select/src/take.rs b/arrow-select/src/take.rs
index 7f7791a07a..1961a604d9 100644
--- a/arrow-select/src/take.rs
+++ b/arrow-select/src/take.rs
@@ -1011,7 +1011,6 @@ to_indices_reinterpret!(Int64Type, UInt64Type);
 /// # use arrow_array::{StringArray, Int32Array, UInt32Array, RecordBatch};
 /// # use arrow_schema::{DataType, Field, Schema};
 /// # use arrow_select::take::take_record_batch;
-///
 /// let schema = Arc::new(Schema::new(vec![
 ///     Field::new("a", DataType::Int32, true),
 ///     Field::new("b", DataType::Utf8, true),
diff --git a/arrow-select/src/window.rs b/arrow-select/src/window.rs
index fbd145d08d..74f7f4a791 100644
--- a/arrow-select/src/window.rs
+++ b/arrow-select/src/window.rs
@@ -29,7 +29,6 @@ use num_traits::abs;
 /// ```
 /// # use arrow_array::Int32Array;
 /// # use arrow_select::window::shift;
-///
 /// let a: Int32Array = vec![Some(1), None, Some(4)].into();
 ///
 /// // shift array 1 element to the right

Reply via email to