Skip to content

Commit 843bee2

Browse files
Fix headers and empty lines in code examples (#9064)
# Which issue does this PR close? - Closes #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
1 parent 9213ffd commit 843bee2

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

arrow-arith/src/aggregate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,10 @@ fn aggregate<T: ArrowNativeTypeOp, P: ArrowPrimitiveType<Native = T>, A: Numeric
332332

333333
/// Returns the minimum value in the boolean array.
334334
///
335+
/// # Example
335336
/// ```
336337
/// # use arrow_array::BooleanArray;
337338
/// # use arrow_arith::aggregate::min_boolean;
338-
///
339339
/// let a = BooleanArray::from(vec![Some(true), None, Some(false)]);
340340
/// assert_eq!(min_boolean(&a), Some(false))
341341
/// ```
@@ -390,10 +390,10 @@ pub fn min_boolean(array: &BooleanArray) -> Option<bool> {
390390

391391
/// Returns the maximum value in the boolean array
392392
///
393+
/// # Example
393394
/// ```
394395
/// # use arrow_array::BooleanArray;
395396
/// # use arrow_arith::aggregate::max_boolean;
396-
///
397397
/// let a = BooleanArray::from(vec![Some(true), None, Some(false)]);
398398
/// assert_eq!(max_boolean(&a), Some(true))
399399
/// ```

arrow-ord/src/sort.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ pub struct SortColumn {
846846
/// Returns an `ArrowError::ComputeError(String)` if any of the array type is either unsupported by
847847
/// `lexsort_to_indices` or `take`.
848848
///
849-
/// Example:
849+
/// # Example:
850850
///
851851
/// ```
852852
/// # use std::convert::From;
@@ -855,7 +855,6 @@ pub struct SortColumn {
855855
/// # use arrow_array::types::Int64Type;
856856
/// # use arrow_array::cast::AsArray;
857857
/// # use arrow_ord::sort::{SortColumn, SortOptions, lexsort};
858-
///
859858
/// let sorted_columns = lexsort(&vec![
860859
/// SortColumn {
861860
/// values: Arc::new(PrimitiveArray::<Int64Type>::from(vec![

arrow-select/src/take.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,6 @@ to_indices_reinterpret!(Int64Type, UInt64Type);
10111011
/// # use arrow_array::{StringArray, Int32Array, UInt32Array, RecordBatch};
10121012
/// # use arrow_schema::{DataType, Field, Schema};
10131013
/// # use arrow_select::take::take_record_batch;
1014-
///
10151014
/// let schema = Arc::new(Schema::new(vec![
10161015
/// Field::new("a", DataType::Int32, true),
10171016
/// Field::new("b", DataType::Utf8, true),

arrow-select/src/window.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use num_traits::abs;
2929
/// ```
3030
/// # use arrow_array::Int32Array;
3131
/// # use arrow_select::window::shift;
32-
///
3332
/// let a: Int32Array = vec![Some(1), None, Some(4)].into();
3433
///
3534
/// // shift array 1 element to the right

0 commit comments

Comments
 (0)