mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-12 12:33:29 +02:00
feat: traits done
This commit is contained in:
@@ -6,6 +6,9 @@ trait AppendBar {
|
||||
|
||||
impl AppendBar for String {
|
||||
// TODO: Implement `AppendBar` for the type `String`.
|
||||
fn append_bar(self) -> Self {
|
||||
self + &String::from("Bar")
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
Reference in New Issue
Block a user