diff --git a/circuit/account/src/signature/ternary.rs b/circuit/account/src/signature/ternary.rs index ec05c19753..62aa03c9c1 100644 --- a/circuit/account/src/signature/ternary.rs +++ b/circuit/account/src/signature/ternary.rs @@ -28,16 +28,6 @@ impl Ternary for Signature { } } -impl Ternary for Box> { - type Boolean = Boolean; - type Output = Box>; - - /// Returns `first` if `condition` is `true`, otherwise returns `second`. - fn ternary(condition: &Self::Boolean, first: &Self, second: &Self) -> Self::Output { - Box::new(Signature::ternary(condition, first, second)) - } -} - impl Metrics, Output = Signature>> for Signature { type Case = (Mode, Mode, Mode); diff --git a/console/account/src/signature/bitwise.rs b/console/account/src/signature/bitwise.rs index 95add60aaf..edd09082b1 100644 --- a/console/account/src/signature/bitwise.rs +++ b/console/account/src/signature/bitwise.rs @@ -40,13 +40,3 @@ impl Ternary for Signature { } } } - -impl Ternary for Box> { - type Boolean = Boolean; - type Output = Self; - - /// Returns `first` if `condition` is `true`, otherwise returns `second`. - fn ternary(condition: &Self::Boolean, first: &Self, second: &Self) -> Self::Output { - Box::new(Signature::ternary(condition, first, second)) - } -} diff --git a/console/network/environment/src/traits/bitwise.rs b/console/network/environment/src/traits/bitwise.rs index c21fb9fbdd..b499132fb9 100644 --- a/console/network/environment/src/traits/bitwise.rs +++ b/console/network/environment/src/traits/bitwise.rs @@ -66,3 +66,13 @@ pub trait Ternary { where Self: Sized; } + +impl Ternary for Box { + type Boolean = T::Boolean; + type Output = Box; + + /// Returns `first` if `condition` is `true`, otherwise returns `second`. + fn ternary(condition: &Self::Boolean, first: &Self, second: &Self) -> Self::Output { + Box::new(T::ternary(condition, first, second)) + } +}