remove lifetime notations causing errors
This commit is contained in:
parent
3a0ff55aa3
commit
047dbefd6f
6 changed files with 16 additions and 16 deletions
|
@ -58,14 +58,14 @@ trait ScalarConv<S> {
|
|||
|
||||
impl<S: BaseFloat> ScalarConv<S> for Rad<S> {
|
||||
#[inline] fn from(s: S) -> Rad<S> { rad(s) }
|
||||
#[inline] fn s<'a>(&'a self) -> &'a S { &'a self.s }
|
||||
#[inline] fn mut_s<'a>(&'a mut self) -> &'a mut S { &'a mut self.s }
|
||||
#[inline] fn s<'a>(&'a self) -> &'a S { &self.s }
|
||||
#[inline] fn mut_s<'a>(&'a mut self) -> &'a mut S { &mut self.s }
|
||||
}
|
||||
|
||||
impl<S: BaseFloat> ScalarConv<S> for Deg<S> {
|
||||
#[inline] fn from(s: S) -> Deg<S> { deg(s) }
|
||||
#[inline] fn s<'a>(&'a self) -> &'a S { &'a self.s }
|
||||
#[inline] fn mut_s<'a>(&'a mut self) -> &'a mut S { &'a mut self.s }
|
||||
#[inline] fn s<'a>(&'a self) -> &'a S { &self.s }
|
||||
#[inline] fn mut_s<'a>(&'a mut self) -> &'a mut S { &mut self.s }
|
||||
}
|
||||
|
||||
/// Operations on angles.
|
||||
|
|
|
@ -396,13 +396,13 @@ impl<S: Copy> Array2<Vector2<S>, Vector2<S>, S> for Matrix2<S> {
|
|||
#[inline]
|
||||
fn c<'a>(&'a self, c: uint) -> &'a Vector2<S> {
|
||||
let slice: &'a [Vector2<S>, ..2] = unsafe { mem::transmute(self) };
|
||||
&'a slice[c]
|
||||
&slice[c]
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn mut_c<'a>(&'a mut self, c: uint) -> &'a mut Vector2<S> {
|
||||
let slice: &'a mut [Vector2<S>, ..2] = unsafe { mem::transmute(self) };
|
||||
&'a mut slice[c]
|
||||
&mut slice[c]
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -428,13 +428,13 @@ impl<S: Copy> Array2<Vector3<S>, Vector3<S>, S> for Matrix3<S> {
|
|||
#[inline]
|
||||
fn c<'a>(&'a self, c: uint) -> &'a Vector3<S> {
|
||||
let slice: &'a [Vector3<S>, ..3] = unsafe { mem::transmute(self) };
|
||||
&'a slice[c]
|
||||
&slice[c]
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn mut_c<'a>(&'a mut self, c: uint) -> &'a mut Vector3<S> {
|
||||
let slice: &'a mut [Vector3<S>, ..3] = unsafe { mem::transmute(self) };
|
||||
&'a mut slice[c]
|
||||
&mut slice[c]
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -462,13 +462,13 @@ impl<S: Copy> Array2<Vector4<S>, Vector4<S>, S> for Matrix4<S> {
|
|||
#[inline]
|
||||
fn c<'a>(&'a self, c: uint) -> &'a Vector4<S> {
|
||||
let slice: &'a [Vector4<S>, ..4] = unsafe { mem::transmute(self) };
|
||||
&'a slice[c]
|
||||
&slice[c]
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn mut_c<'a>(&'a mut self, c: uint) -> &'a mut Vector4<S> {
|
||||
let slice: &'a mut [Vector4<S>, ..4] = unsafe { mem::transmute(self) };
|
||||
&'a mut slice[c]
|
||||
&mut slice[c]
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -118,7 +118,7 @@ impl<S: BaseNum> Array1<S> for Point2<S> {
|
|||
#[inline]
|
||||
fn mut_i<'a>(&'a mut self, i: uint) -> &'a mut S {
|
||||
let slice: &'a mut [S, ..2] = unsafe { mem::transmute(self) };
|
||||
&'a mut slice[i]
|
||||
&mut slice[i]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ impl<S: BaseNum> Array1<S> for Point3<S> {
|
|||
#[inline]
|
||||
fn mut_i<'a>(&'a mut self, i: uint) -> &'a mut S {
|
||||
let slice: &'a mut [S, ..3] = unsafe { mem::transmute(self) };
|
||||
&'a mut slice[i]
|
||||
&mut slice[i]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ impl<S: Copy> Array1<S> for Quaternion<S> {
|
|||
#[inline]
|
||||
fn mut_i<'a>(&'a mut self, i: uint) -> &'a mut S {
|
||||
let slice: &'a mut [S, ..4] = unsafe { mem::transmute(self) };
|
||||
&'a mut slice[i]
|
||||
&mut slice[i]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ pub struct Basis2<S> {
|
|||
impl<S: BaseFloat> Basis2<S> {
|
||||
/// Coerce to a `Matrix2`
|
||||
#[inline]
|
||||
pub fn as_matrix2<'a>(&'a self) -> &'a Matrix2<S> { &'a self.mat }
|
||||
pub fn as_matrix2<'a>(&'a self) -> &'a Matrix2<S> { &self.mat }
|
||||
}
|
||||
|
||||
/// Represents types which can be converted to a rotation matrix.
|
||||
|
@ -217,7 +217,7 @@ impl<S: BaseFloat> Basis3<S> {
|
|||
|
||||
/// Coerce to a `Matrix3`
|
||||
#[inline]
|
||||
pub fn as_matrix3<'a>(&'a self) -> &'a Matrix3<S> { &'a self.mat }
|
||||
pub fn as_matrix3<'a>(&'a self) -> &'a Matrix3<S> { &self.mat }
|
||||
}
|
||||
|
||||
/// Represents types which can be converted to a rotation matrix.
|
||||
|
|
|
@ -142,7 +142,7 @@ macro_rules! vec(
|
|||
#[inline]
|
||||
fn mut_i<'a>(&'a mut self, i: uint) -> &'a mut S {
|
||||
let slice: &'a mut [S, ..$n] = unsafe { mem::transmute(self) };
|
||||
&'a mut slice[i]
|
||||
&mut slice[i]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue