Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Nov 3, 2022
1 parent e37076a commit 797ecc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arrow/src/datatypes/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ macro_rules! native_type_op {
})
}

fn pow_checked(self, mut exp: u32) -> Result<Self> {
fn pow_checked(self, exp: u32) -> Result<Self> {
self.checked_pow(exp).ok_or_else(|| {
ArrowError::ComputeError(format!("Overflow happened on: {:?}", self))
})
}

fn pow_wrapping(self, mut exp: u32) -> Self {
fn pow_wrapping(self, exp: u32) -> Self {
self.wrapping_pow(exp)
}

Expand Down Expand Up @@ -294,11 +294,11 @@ macro_rules! native_type_float_op {
-self
}

fn pow_checked(self, mut exp: u32) -> Result<Self> {
fn pow_checked(self, exp: u32) -> Result<Self> {
Ok(self.powi(exp as i32))
}

fn pow_wrapping(self, mut exp: u32) -> Self {
fn pow_wrapping(self, exp: u32) -> Self {
self.powi(exp as i32)
}

Expand Down

0 comments on commit 797ecc4

Please sign in to comment.