Skip to content

Commit acbf9dc

Browse files
committed
finish traits1
1 parent b1fe945 commit acbf9dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

exercises/traits/traits1.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ trait AppendBar {
1515

1616
impl AppendBar for String {
1717
// TODO: Implement `AppendBar` for type `String`.
18+
fn append_bar(mut self) -> Self{
19+
self.push_str("Bar");
20+
return self
21+
}
1822
}
1923

2024
fn main() {

0 commit comments

Comments
 (0)