Implement the ToString trait for TimeVal instead of a custon function
This commit is contained in:
parent
9dbd90a083
commit
d76d60650a
1 changed files with 2 additions and 2 deletions
|
@ -102,8 +102,8 @@ pub struct TimeVal {
|
||||||
pub usec: i64,
|
pub usec: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TimeVal {
|
impl ToString for TimeVal {
|
||||||
pub fn to_string(&self) -> String {
|
fn to_string(&self) -> String {
|
||||||
format!("{}.{}", self.sec, self.usec)
|
format!("{}.{}", self.sec, self.usec)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue