Update uses of fail to macro calls
This commit is contained in:
parent
9c3f2e8774
commit
fdff434325
8 changed files with 11 additions and 11 deletions
|
@ -210,7 +210,7 @@ pub impl<T:Copy Float> Mat2<T>: MutableMatrix<T, Vec2<T>> {
|
|||
match i {
|
||||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
_ => fail(fmt!("index out of bounds: expected an index from 0 to 1, but found %u", i))
|
||||
_ => fail!(fmt!("index out of bounds: expected an index from 0 to 1, but found %u", i))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -263,7 +263,7 @@ pub impl<T:Copy Float> Mat2<T>: MutableMatrix<T, Vec2<T>> {
|
|||
fn invert_self(&mut self) {
|
||||
match self.inverse() {
|
||||
Some(m) => (*self) = m,
|
||||
None => fail(~"Couldn't invert the matrix!")
|
||||
None => fail!(~"Couldn't invert the matrix!")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -477,7 +477,7 @@ pub impl<T:Copy Float> Mat3<T>: MutableMatrix<T, Vec3<T>> {
|
|||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
2 => &mut self.z,
|
||||
_ => fail(fmt!("index out of bounds: expected an index from 0 to 2, but found %u", i))
|
||||
_ => fail!(fmt!("index out of bounds: expected an index from 0 to 2, but found %u", i))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -534,7 +534,7 @@ pub impl<T:Copy Float> Mat3<T>: MutableMatrix<T, Vec3<T>> {
|
|||
fn invert_self(&mut self) {
|
||||
match self.inverse() {
|
||||
Some(m) => (*self) = m,
|
||||
None => fail(~"Couldn't invert the matrix!")
|
||||
None => fail!(~"Couldn't invert the matrix!")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -403,7 +403,7 @@ pub impl<T:Copy Float> Mat4<T>: MutableMatrix<T, Vec4<T>> {
|
|||
1 => &mut self.y,
|
||||
2 => &mut self.z,
|
||||
3 => &mut self.w,
|
||||
_ => fail(fmt!("index out of bounds: expected an index from 0 to 3, but found %u", i))
|
||||
_ => fail!(fmt!("index out of bounds: expected an index from 0 to 3, but found %u", i))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -464,7 +464,7 @@ pub impl<T:Copy Float> Mat4<T>: MutableMatrix<T, Vec4<T>> {
|
|||
fn invert_self(&mut self) {
|
||||
match self.inverse() {
|
||||
Some(m) => (*self) = m,
|
||||
None => fail(~"Couldn't invert the matrix!")
|
||||
None => fail!(~"Couldn't invert the matrix!")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ pub impl<T:Copy Float> Quat<T> {
|
|||
}
|
||||
|
||||
pure fn get_angle_axis(&self) -> (T, Vec3<T>) {
|
||||
fail(~"Not yet implemented.")
|
||||
fail!(~"Not yet implemented.")
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
|
|
@ -21,7 +21,7 @@ pub impl VecMatch: Index<uint, float> {
|
|||
1 => self.y,
|
||||
2 => self.z,
|
||||
3 => self.w,
|
||||
_ => fail(~"Vector index out of bounds.")
|
||||
_ => fail!(~"Vector index out of bounds.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ pub impl<T:Copy> Vec2<T>: MutableVector<T> {
|
|||
match i {
|
||||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
_ => fail(fmt!("index out of bounds: expected an index from 0 to 1, but found %u", i))
|
||||
_ => fail!(fmt!("index out of bounds: expected an index from 0 to 1, but found %u", i))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ pub impl<T:Copy> Vec3<T>: MutableVector<T> {
|
|||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
2 => &mut self.z,
|
||||
_ => fail(fmt!("index out of bounds: expected an index from 0 to 2, but found %u", i))
|
||||
_ => fail!(fmt!("index out of bounds: expected an index from 0 to 2, but found %u", i))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ pub impl<T:Copy> Vec4<T>: MutableVector<T> {
|
|||
1 => &mut self.y,
|
||||
2 => &mut self.z,
|
||||
3 => &mut self.w,
|
||||
_ => fail(fmt!("index out of bounds: expected an index from 0 to 3, but found %u", i))
|
||||
_ => fail!(fmt!("index out of bounds: expected an index from 0 to 3, but found %u", i))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue