Skip to content

Commit

Permalink
Remove duplicate impl
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jan 17, 2024
1 parent 13d5295 commit 72aa951
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 4 additions & 1 deletion crates/polars-plan/src/dsl/arithmetic.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use std::ops::{Add, Div, Mul, Neg, Rem, Sub};
#[cfg(feature = "negate")]
use std::ops::Neg;
use std::ops::{Add, Div, Mul, Rem, Sub};

use super::*;

Expand Down Expand Up @@ -43,6 +45,7 @@ impl Rem for Expr {
}
}

#[cfg(feature = "negate")]
impl Neg for Expr {
type Output = Expr;

Expand Down
6 changes: 0 additions & 6 deletions crates/polars-plan/src/dsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,6 @@ impl Expr {
binary_expr(self, Operator::LtEq, other.into())
}

/// Negate `Expr`.
#[allow(clippy::should_implement_trait)]
pub fn not(self) -> Expr {
self.map_private(BooleanFunction::Not.into())
}

/// Rename Column.
pub fn alias(self, name: &str) -> Expr {
Expr::Alias(Box::new(self), Arc::from(name))
Expand Down
1 change: 0 additions & 1 deletion crates/polars-plan/src/dsl/unary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::dsl::Expr;
impl Not for Expr {
type Output = Expr;

#[allow(clippy::should_implement_trait)]
fn not(self) -> Expr {
self.map_private(BooleanFunction::Not.into())
}
Expand Down

0 comments on commit 72aa951

Please sign in to comment.