replace deprecated try! macro by ? operator
This commit is contained in:
parent
ec5261d15b
commit
935f389983
4 changed files with 12 additions and 12 deletions
|
@ -1520,21 +1520,21 @@ impl<S: BaseFloat> From<Matrix3<S>> for Quaternion<S> {
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Matrix2<S> {
|
impl<S: fmt::Debug> fmt::Debug for Matrix2<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Matrix2 "));
|
write!(f, "Matrix2 ")?;
|
||||||
<[[S; 2]; 2] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[[S; 2]; 2] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Matrix3<S> {
|
impl<S: fmt::Debug> fmt::Debug for Matrix3<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Matrix3 "));
|
write!(f, "Matrix3 ")?;
|
||||||
<[[S; 3]; 3] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[[S; 3]; 3] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Matrix4<S> {
|
impl<S: fmt::Debug> fmt::Debug for Matrix4<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Matrix4 "));
|
write!(f, "Matrix4 ")?;
|
||||||
<[[S; 4]; 4] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[[S; 4]; 4] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,21 +370,21 @@ impl_mint_conversions!(Point3 { x, y, z }, Point3);
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Point1<S> {
|
impl<S: fmt::Debug> fmt::Debug for Point1<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Point1 "));
|
write!(f, "Point1 ")?;
|
||||||
<[S; 1] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[S; 1] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Point2<S> {
|
impl<S: fmt::Debug> fmt::Debug for Point2<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Point2 "));
|
write!(f, "Point2 ")?;
|
||||||
<[S; 2] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[S; 2] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Point3<S> {
|
impl<S: fmt::Debug> fmt::Debug for Point3<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Point3 "));
|
write!(f, "Point3 ")?;
|
||||||
<[S; 3] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[S; 3] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,7 +263,7 @@ impl<S: BaseFloat> Rotation2<S> for Basis2<S> {
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Basis2<S> {
|
impl<S: fmt::Debug> fmt::Debug for Basis2<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Basis2 "));
|
write!(f, "Basis2 ")?;
|
||||||
<[[S; 2]; 2] as fmt::Debug>::fmt(self.mat.as_ref(), f)
|
<[[S; 2]; 2] as fmt::Debug>::fmt(self.mat.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -445,7 +445,7 @@ where
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Basis3<S> {
|
impl<S: fmt::Debug> fmt::Debug for Basis3<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Basis3 "));
|
write!(f, "Basis3 ")?;
|
||||||
<[[S; 3]; 3] as fmt::Debug>::fmt(self.mat.as_ref(), f)
|
<[[S; 3]; 3] as fmt::Debug>::fmt(self.mat.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -840,28 +840,28 @@ impl<S: BaseFloat> InnerSpace for Vector4<S> {
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Vector1<S> {
|
impl<S: fmt::Debug> fmt::Debug for Vector1<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Vector1 "));
|
write!(f, "Vector1 ")?;
|
||||||
<[S; 1] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[S; 1] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Vector2<S> {
|
impl<S: fmt::Debug> fmt::Debug for Vector2<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Vector2 "));
|
write!(f, "Vector2 ")?;
|
||||||
<[S; 2] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[S; 2] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Vector3<S> {
|
impl<S: fmt::Debug> fmt::Debug for Vector3<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Vector3 "));
|
write!(f, "Vector3 ")?;
|
||||||
<[S; 3] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[S; 3] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: fmt::Debug> fmt::Debug for Vector4<S> {
|
impl<S: fmt::Debug> fmt::Debug for Vector4<S> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(write!(f, "Vector4 "));
|
write!(f, "Vector4 ")?;
|
||||||
<[S; 4] as fmt::Debug>::fmt(self.as_ref(), f)
|
<[S; 4] as fmt::Debug>::fmt(self.as_ref(), f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue