File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,37 +11,37 @@ pub trait Animal {
1111}
1212#[ derive( Default ) ]
1313pub struct Dog { }
14+ impl Animal for Dog {
15+ fn bark ( & self ) -> bool {
16+ return true ;
17+ }
18+ }
1419impl Clone for Dog {
1520 fn clone ( & self ) -> Self {
1621 let mut this = Self { } ;
1722 this
1823 }
1924}
2025impl ByteRepr for Dog { }
21- impl Animal for Dog {
22- fn bark ( & self ) -> bool {
23- return true ;
24- }
25- }
2626#[ derive( Default ) ]
2727pub struct Cat { }
2828impl Cat {
2929 fn meow ( & self ) -> bool {
3030 return true ;
3131 }
3232}
33+ impl Animal for Cat {
34+ fn bark ( & self ) -> bool {
35+ return false ;
36+ }
37+ }
3338impl Clone for Cat {
3439 fn clone ( & self ) -> Self {
3540 let mut this = Self { } ;
3641 this
3742 }
3843}
3944impl ByteRepr for Cat { }
40- impl Animal for Cat {
41- fn bark ( & self ) -> bool {
42- return false ;
43- }
44- }
4545pub fn main ( ) {
4646 std:: process:: exit ( main_0 ( ) ) ;
4747}
You can’t perform that action at this time.
0 commit comments