addition: Display
This commit is contained in:
@@ -154,7 +154,7 @@ impl ops::Neg for Fraction {
|
|||||||
|
|
||||||
impl fmt::Display for Fraction {
|
impl fmt::Display for Fraction {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
todo!()
|
write!(f, "{0}/{1}", self.num, self.den)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user