Skip to content

Commit

Permalink
Show and String have become Debug and Display
Browse files Browse the repository at this point in the history
  • Loading branch information
renato-zannon committed Jan 22, 2015
1 parent 036c43c commit 97087a8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,27 +135,27 @@ impl Ascii {
}
}

impl fmt::String for Ascii {
impl fmt::Display for Ascii {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(&(self.chr as char), f)
fmt::Display::fmt(&(self.chr as char), f)
}
}

impl fmt::String for Vec<Ascii> {
impl fmt::Display for Vec<Ascii> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(&self[], f)
fmt::Display::fmt(&self[], f)
}
}

impl fmt::String for [Ascii] {
impl fmt::Display for [Ascii] {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self.as_str(), f)
fmt::Display::fmt(self.as_str(), f)
}
}

impl fmt::Show for Ascii {
impl fmt::Debug for Ascii {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Show::fmt(&(self.chr as char), f)
fmt::Debug::fmt(&(self.chr as char), f)
}
}

Expand Down

0 comments on commit 97087a8

Please sign in to comment.