Make lifetimes explicit, as required in latest updates to rust

This commit is contained in:
Brendan Zabarauskas 2013-04-15 06:43:21 +10:00
parent 887544b0b2
commit aad2d62f37
2 changed files with 8 additions and 8 deletions

View file

@ -129,7 +129,7 @@ pub trait BaseMat<T,V>: Index<uint, V> + Eq + Neg<Self> {
*
* A mutable reference to the column at `i`
*/
fn col_mut(&mut self, i: uint) -> &'self mut V;
fn col_mut<'a>(&'a mut self, i: uint) -> &'a mut V;
/**
* Swap two columns of the matrix in place
@ -439,7 +439,7 @@ impl<T:Copy + Float + Zero + One + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> +
}
#[inline(always)]
fn col_mut(&mut self, i: uint) -> &'self mut Vec2<T> {
fn col_mut<'a>(&'a mut self, i: uint) -> &'a mut Vec2<T> {
match i {
0 => &mut self.x,
1 => &mut self.y,
@ -875,7 +875,7 @@ impl<T:Copy + Float + Zero + One + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> +
}
#[inline(always)]
fn col_mut(&mut self, i: uint) -> &'self mut Vec3<T> {
fn col_mut<'a>(&'a mut self, i: uint) -> &'a mut Vec3<T> {
match i {
0 => &mut self.x,
1 => &mut self.y,
@ -1537,7 +1537,7 @@ impl<T:Copy + Float + Zero + One + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> +
}
#[inline(always)]
fn col_mut(&mut self, i: uint) -> &'self mut Vec4<T> {
fn col_mut<'a>(&'a mut self, i: uint) -> &'a mut Vec4<T> {
match i {
0 => &mut self.x,
1 => &mut self.y,

View file

@ -28,7 +28,7 @@ pub trait BaseVec<T>: Index<uint,T> + Eq {
/**
* Get a mutable reference to the component at `i`
*/
fn index_mut(&mut self, i: uint) -> &'self mut T;
fn index_mut<'a>(&'a mut self, i: uint) -> &'a mut T;
/**
* Swap two components of the vector in place
@ -534,7 +534,7 @@ impl<T:Copy + Eq> BaseVec<T> for Vec2<T> {
}
#[inline(always)]
fn index_mut(&mut self, i: uint) -> &'self mut T {
fn index_mut<'a>(&'a mut self, i: uint) -> &'a mut T {
match i {
0 => &mut self.x,
1 => &mut self.y,
@ -912,7 +912,7 @@ impl<T:Copy + Eq> BaseVec<T> for Vec3<T> {
}
#[inline(always)]
fn index_mut(&mut self, i: uint) -> &'self mut T {
fn index_mut<'a>(&'a mut self, i: uint) -> &'a mut T {
match i {
0 => &mut self.x,
1 => &mut self.y,
@ -1309,7 +1309,7 @@ impl<T:Copy + Eq> BaseVec<T> for Vec4<T> {
}
#[inline(always)]
fn index_mut(&mut self, i: uint) -> &'self mut T {
fn index_mut<'a>(&'a mut self, i: uint) -> &'a mut T {
match i {
0 => &mut self.x,
1 => &mut self.y,