Add missing type bounds.

This commit is contained in:
Sébastien Crozet 2013-07-25 14:50:55 +02:00
parent 4f3de703b7
commit 164ff5b1b2
2 changed files with 4 additions and 4 deletions

View File

@ -143,7 +143,7 @@ impl<N: Ring> Dot<N> for vec::Vec0<N>
{ Zero::zero() }
}
impl<N: Ring> SubDot<N> for vec::Vec0<N>
impl<N: Clone + Ring> SubDot<N> for vec::Vec0<N>
{
#[inline]
fn sub_dot(&self, _: &vec::Vec0<N>, _: &vec::Vec0<N>) -> N

View File

@ -180,7 +180,7 @@ macro_rules! basis_impl(
macro_rules! add_impl(
($t: ident, $comp0: ident $(,$compN: ident)*) => (
impl<N: Clone + Add<N,N>> Add<$t<N>, $t<N>> for $t<N>
impl<N: Clone + Add<N, N>> Add<$t<N>, $t<N>> for $t<N>
{
#[inline]
fn add(&self, other: &$t<N>) -> $t<N>
@ -191,7 +191,7 @@ macro_rules! add_impl(
macro_rules! sub_impl(
($t: ident, $comp0: ident $(,$compN: ident)*) => (
impl<N: Clone + Sub<N,N>> Sub<$t<N>, $t<N>> for $t<N>
impl<N: Clone + Sub<N, N>> Sub<$t<N>, $t<N>> for $t<N>
{
#[inline]
fn sub(&self, other: &$t<N>) -> $t<N>
@ -224,7 +224,7 @@ macro_rules! dot_impl(
macro_rules! sub_dot_impl(
($t: ident, $comp0: ident $(,$compN: ident)*) => (
impl<N: Ring> SubDot<N> for $t<N>
impl<N: Clone + Ring> SubDot<N> for $t<N>
{
#[inline]
fn sub_dot(&self, a: &$t<N>, b: &$t<N>) -> N