diff --git a/rustbyexample/01221/src/main.rs b/rustbyexample/01221/src/main.rs index f28d417..98e9783 100644 --- a/rustbyexample/01221/src/main.rs +++ b/rustbyexample/01221/src/main.rs @@ -10,7 +10,7 @@ impl fmt::Display for List { for (count, v) in vec.iter().enumerate() { if count != 0 { try!(write!(f, ", ")); } - try!(write!(f, "{}", v)); + try!(write!(f, "{}: {}", count, v)); } write!(f, "]")