Skip to content

Commit

Permalink
remove clippy unnecessary wraps
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiayu Liu committed Jun 11, 2021
1 parent 0c00776 commit e1c2dc4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions arrow/src/compute/kernels/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,6 @@ const EPOCH_DAYS_FROM_CE: i32 = 719_163;
/// Arrays should have the same primitive data type, otherwise this should fail.
/// We do not perform this check on primitive data types as we only use this
/// function internally, where it is guaranteed to be infallible.
#[allow(clippy::unnecessary_wraps)]
fn cast_array_data<TO>(array: &ArrayRef, to_type: DataType) -> Result<ArrayRef>
where
TO: ArrowNumericType,
Expand All @@ -974,7 +973,6 @@ where
}

/// Convert Array into a PrimitiveArray of type, and apply numeric cast
#[allow(clippy::unnecessary_wraps)]
fn cast_numeric_arrays<FROM, TO>(from: &ArrayRef) -> Result<ArrayRef>
where
FROM: ArrowNumericType,
Expand Down Expand Up @@ -1006,7 +1004,6 @@ where
}

/// Cast numeric types to Utf8
#[allow(clippy::unnecessary_wraps)]
fn cast_numeric_to_string<FROM, OffsetSize>(array: &ArrayRef) -> Result<ArrayRef>
where
FROM: ArrowNumericType,
Expand Down Expand Up @@ -1035,7 +1032,6 @@ where
}

/// Cast numeric types to Utf8
#[allow(clippy::unnecessary_wraps)]
fn cast_string_to_numeric<T, Offset: StringOffsetSizeTrait>(
from: &ArrayRef,
cast_options: &CastOptions,
Expand Down Expand Up @@ -1101,7 +1097,6 @@ where
}

/// Casts generic string arrays to Date32Array
#[allow(clippy::unnecessary_wraps)]
fn cast_string_to_date32<Offset: StringOffsetSizeTrait>(
array: &dyn Array,
cast_options: &CastOptions,
Expand Down Expand Up @@ -1164,7 +1159,6 @@ fn cast_string_to_date32<Offset: StringOffsetSizeTrait>(
}

/// Casts generic string arrays to Date64Array
#[allow(clippy::unnecessary_wraps)]
fn cast_string_to_date64<Offset: StringOffsetSizeTrait>(
array: &dyn Array,
cast_options: &CastOptions,
Expand Down Expand Up @@ -1226,7 +1220,6 @@ fn cast_string_to_date64<Offset: StringOffsetSizeTrait>(
}

/// Casts generic string arrays to TimeStampNanosecondArray
#[allow(clippy::unnecessary_wraps)]
fn cast_string_to_timestamp_ns<Offset: StringOffsetSizeTrait>(
array: &dyn Array,
cast_options: &CastOptions,
Expand Down Expand Up @@ -1308,7 +1301,6 @@ where
/// Cast Boolean types to numeric
///
/// `false` returns 0 while `true` returns 1
#[allow(clippy::unnecessary_wraps)]
fn cast_bool_to_numeric<TO>(
from: &ArrayRef,
cast_options: &CastOptions,
Expand Down

0 comments on commit e1c2dc4

Please sign in to comment.