Merge pull request '🐛 Replace Equals with SequenceEqual for a collection' (#200) from apply-fixes-following-interview into main
continuous-integration/drone/push Build is passing Details

Reviewed-on: #200
main
Alexis Drai 2 years ago
commit 89c98fef2c

@ -69,7 +69,7 @@ namespace Model.Dice
public Task<DiceGroup> Update(DiceGroup before, DiceGroup after) public Task<DiceGroup> Update(DiceGroup before, DiceGroup after)
{ {
// pas autorisé de changer les dés, juste le nom // pas autorisé de changer les dés, juste le nom
if (!before.Dice.Equals(after.Dice)) if (!before.Dice.SequenceEqual(after.Dice))
{ {
throw new ArgumentException("the group of dice cannot be updated, only the name", nameof(before)); throw new ArgumentException("the group of dice cannot be updated, only the name", nameof(before));
} }

Loading…
Cancel
Save