Skip to content

Commit

Permalink
Implement the strategy pattern in a way that separates the duck class…
Browse files Browse the repository at this point in the history
…es/structures (Mallard and Model) since they have different reasons to change.
  • Loading branch information
Allaeddineattia committed Mar 21, 2021
1 parent 85a9bb9 commit 3f13582
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions behavioral/strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ impl FlyBehaviour for FlyNoWay{
}
}

trait QuackBehaviour{
fn quack();
}

trait Duck {
fn get_fly_behaviour(&self) -> & dyn FlyBehaviour;
fn fly(&self){
Expand Down

0 comments on commit 3f13582

Please sign in to comment.