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>
+ ToDeg<S>
+ ScalarConv<S>
+ fmt::Show
+ fmt::Debug
{
/// Create a new angle from any other valid angle.
fn from<A: Angle<S>>(theta: A) -> Self;
@ -154,7 +154,7 @@ pub trait Angle
#[inline] fn turn_div_3() -> Self { let full_turn: Self = Angle::full_turn(); full_turn.div_s(cast(3i8).unwrap()) }
#[inline] fn turn_div_4() -> Self { let full_turn: Self = Angle::full_turn(); full_turn.div_s(cast(4i8).unwrap()) }
#[inline] fn turn_div_6() -> Self { let full_turn: Self = Angle::full_turn(); full_turn.div_s(cast(6i8).unwrap()) }
#[inline] fn equiv(&self, other: &Self) -> bool { self.normalize() == other.normalize() }
}
@ -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 atan2<S: BaseFloat>(a: S, b: S) -> Rad<S> { rad(a.atan2(b)) }
impl<S: BaseFloat + fmt::Show>
fmt::Show for Rad<S> {
impl<S: BaseFloat + fmt::Debug>
fmt::Debug for Rad<S> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?} rad", self.s)
}
}
impl<S: BaseFloat + fmt::Show>
fmt::Show for Deg<S> {
impl<S: BaseFloat + fmt::Debug>
fmt::Debug for Deg<S> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}°", self.s)
}

View file

@ -73,7 +73,7 @@ pub trait One {
pub trait BaseNum:
Copy + NumCast + Clone + Add<Output=Self> + Sub<Output=Self> +
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
{}