We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3c85fc4 + a0a0623 commit 26b347aCopy full SHA for 26b347a
exercises/traits/traits5.rs
@@ -18,16 +18,20 @@ pub trait OtherTrait {
18
}
19
20
21
-struct SomeStruct {
22
- name: String,
23
-}
+struct SomeStruct {}
+struct OtherStruct {}
24
25
impl SomeTrait for SomeStruct {}
26
impl OtherTrait for SomeStruct {}
+impl SomeTrait for OtherStruct {}
27
+impl OtherTrait for OtherStruct {}
28
29
// YOU MAY ONLY CHANGE THE NEXT LINE
30
fn some_func(item: ??) -> bool {
31
item.some_function() && item.other_function()
32
33
-fn main() {}
34
+fn main() {
35
+ some_func(SomeStruct {});
36
+ some_func(OtherStruct {});
37
+}
0 commit comments