Skip to content

Commit

Permalink
Remove NativeDecimalType (#2945)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Oct 27, 2022
1 parent 994be05 commit afa8e27
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions arrow-array/src/types.rs
Expand Up @@ -472,17 +472,6 @@ mod private {
impl DecimalTypeSealed for Decimal256Type {}
}

/// Trait representing the in-memory layout of a decimal type
pub trait NativeDecimalType: Send + Sync + Copy + AsRef<[u8]> {
fn from_slice(slice: &[u8]) -> Self;
}

impl<const N: usize> NativeDecimalType for [u8; N] {
fn from_slice(slice: &[u8]) -> Self {
slice.try_into().unwrap()
}
}

/// A trait over the decimal types, used by [`DecimalArray`] to provide a generic
/// implementation across the various decimal types
///
Expand Down

0 comments on commit afa8e27

Please sign in to comment.