Merge pull request #161 from TyOverby/showfix
Rename fmt::Show to fmt::Debug
This commit is contained in:
commit
9bb0f78944
2 changed files with 7 additions and 7 deletions
10
src/angle.rs
10
src/angle.rs
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue