core: Add to_str impls for remaining int types
This commit is contained in:
@@ -1,13 +1,28 @@
|
|||||||
iface to_str { fn to_str() -> str; }
|
iface to_str { fn to_str() -> str; }
|
||||||
|
|
||||||
impl of to_str for int {
|
impl of to_str for i8 {
|
||||||
fn to_str() -> str { int::str(self) }
|
fn to_str() -> str { i8::str(self) }
|
||||||
}
|
}
|
||||||
impl of to_str for uint {
|
impl of to_str for i16 {
|
||||||
fn to_str() -> str { uint::str(self) }
|
fn to_str() -> str { i16::str(self) }
|
||||||
|
}
|
||||||
|
impl of to_str for i32 {
|
||||||
|
fn to_str() -> str { i32::str(self) }
|
||||||
|
}
|
||||||
|
impl of to_str for i64 {
|
||||||
|
fn to_str() -> str { i64::str(self) }
|
||||||
}
|
}
|
||||||
impl of to_str for u8 {
|
impl of to_str for u8 {
|
||||||
fn to_str() -> str { uint::str(self as uint) }
|
fn to_str() -> str { u8::str(self) }
|
||||||
|
}
|
||||||
|
impl of to_str for u16 {
|
||||||
|
fn to_str() -> str { u16::str(self) }
|
||||||
|
}
|
||||||
|
impl of to_str for u32 {
|
||||||
|
fn to_str() -> str { u32::str(self) }
|
||||||
|
}
|
||||||
|
impl of to_str for u64 {
|
||||||
|
fn to_str() -> str { u64::str(self) }
|
||||||
}
|
}
|
||||||
impl of to_str for float {
|
impl of to_str for float {
|
||||||
fn to_str() -> str { float::to_str(self, 4u) }
|
fn to_str() -> str { float::to_str(self, 4u) }
|
||||||
|
|||||||
Reference in New Issue
Block a user