@@ -1653,8 +1653,10 @@ mod assign_ops {
1653
1653
"Implement `self ^= rhs` as elementwise bit xor (in place).\n " ) ;
1654
1654
}
1655
1655
1656
- impl < A : Clone + Neg < Output =A > , D : Dimension >
1657
- Array < A , D >
1656
+ impl < A , S , D > ArrayBase < S , D >
1657
+ where A : Clone + Neg < Output =A > ,
1658
+ S : DataMut < Elem =A > ,
1659
+ D : Dimension
1658
1660
{
1659
1661
/// Perform an elementwise negation of `self`, *in place*.
1660
1662
pub fn ineg ( & mut self )
@@ -1665,20 +1667,23 @@ Array<A, D>
1665
1667
}
1666
1668
}
1667
1669
1668
- impl < A : Clone + Neg < Output =A > , D : Dimension >
1669
- Neg for Array < A , D >
1670
+ impl < A , S , D > Neg for ArrayBase < S , D >
1671
+ where A : Clone + Neg < Output =A > ,
1672
+ S : DataMut < Elem =A > ,
1673
+ D : Dimension
1670
1674
{
1671
1675
type Output = Self ;
1672
1676
/// Perform an elementwise negation of `self` and return the result.
1673
- fn neg ( mut self ) -> Array < A , D >
1674
- {
1677
+ fn neg ( mut self ) -> Self {
1675
1678
self . ineg ( ) ;
1676
1679
self
1677
1680
}
1678
1681
}
1679
1682
1680
- impl < A : Clone + Not < Output =A > , D : Dimension >
1681
- Array < A , D >
1683
+ impl < A , S , D > ArrayBase < S , D >
1684
+ where A : Clone + Not < Output =A > ,
1685
+ S : DataMut < Elem =A > ,
1686
+ D : Dimension
1682
1687
{
1683
1688
/// Perform an elementwise unary not of `self`, *in place*.
1684
1689
pub fn inot ( & mut self )
@@ -1689,13 +1694,15 @@ Array<A, D>
1689
1694
}
1690
1695
}
1691
1696
1692
- impl < A : Clone + Not < Output =A > , D : Dimension >
1693
- Not for Array < A , D >
1697
+
1698
+ impl < A , S , D > Not for ArrayBase < S , D >
1699
+ where A : Clone + Not < Output =A > ,
1700
+ S : DataMut < Elem =A > ,
1701
+ D : Dimension
1694
1702
{
1695
1703
type Output = Self ;
1696
1704
/// Perform an elementwise unary not of `self` and return the result.
1697
- fn not ( mut self ) -> Array < A , D >
1698
- {
1705
+ fn not ( mut self ) -> Self {
1699
1706
self . inot ( ) ;
1700
1707
self
1701
1708
}
0 commit comments