rename fmt::Show to fmt::Debug

This commit is contained in:
Ty Overby 2015-01-23 15:01:24 -08:00
parent 9bb77e6a45
commit 72d4460d81
2 changed files with 7 additions and 7 deletions

View file

@ -84,7 +84,7 @@ pub trait Angle
+ ToRad<S> + ToRad<S>
+ ToDeg<S> + ToDeg<S>
+ ScalarConv<S> + ScalarConv<S>
+ fmt::Show + fmt::Debug
{ {
/// Create a new angle from any other valid angle. /// Create a new angle from any other valid angle.
fn from<A: Angle<S>>(theta: A) -> Self; fn from<A: Angle<S>>(theta: A) -> Self;
@ -281,15 +281,15 @@ Angle<S> for Deg<S> {
#[inline] pub fn atan<S: BaseFloat>(s: S) -> Rad<S> { rad(s.atan()) } #[inline] pub fn atan<S: BaseFloat>(s: S) -> Rad<S> { rad(s.atan()) }
#[inline] pub fn atan2<S: BaseFloat>(a: S, b: S) -> Rad<S> { rad(a.atan2(b)) } #[inline] pub fn atan2<S: BaseFloat>(a: S, b: S) -> Rad<S> { rad(a.atan2(b)) }
impl<S: BaseFloat + fmt::Show> impl<S: BaseFloat + fmt::Debug>
fmt::Show for Rad<S> { fmt::Debug for Rad<S> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?} rad", self.s) write!(f, "{:?} rad", self.s)
} }
} }
impl<S: BaseFloat + fmt::Show> impl<S: BaseFloat + fmt::Debug>
fmt::Show for Deg<S> { fmt::Debug for Deg<S> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}°", self.s) write!(f, "{:?}°", self.s)
} }

View file

@ -73,7 +73,7 @@ pub trait One {
pub trait BaseNum: pub trait BaseNum:
Copy + NumCast + Clone + Add<Output=Self> + Sub<Output=Self> + Copy + NumCast + Clone + Add<Output=Self> + Sub<Output=Self> +
Mul<Output=Self> + Div<Output=Self> + Rem<Output=Self> + Neg<Output=Self> + PartialEq Mul<Output=Self> + Div<Output=Self> + Rem<Output=Self> + Neg<Output=Self> + PartialEq
+ PartialOrd + cmp::PartialOrd + fmt::Show + Zero + One + PartialOrd + cmp::PartialOrd + fmt::Debug + Zero + One
{} {}