core: Add to_str impls for remaining int types
This commit is contained in:
parent
df83a793d9
commit
b4516590e4
@ -1,13 +1,28 @@
|
||||
iface to_str { fn to_str() -> str; }
|
||||
|
||||
impl of to_str for int {
|
||||
fn to_str() -> str { int::str(self) }
|
||||
impl of to_str for i8 {
|
||||
fn to_str() -> str { i8::str(self) }
|
||||
}
|
||||
impl of to_str for uint {
|
||||
fn to_str() -> str { uint::str(self) }
|
||||
impl of to_str for i16 {
|
||||
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 {
|
||||
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 {
|
||||
fn to_str() -> str { float::to_str(self, 4u) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user