zbigniewzolnierowicz / rust-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a newtype for checking if a recipe has no ingredients

zbigniewzolnierowicz opened this issue · comments

We should follow the "make the invalid states unrepresentable" axiom and create a newtype, which you cannot have no ingredients - you can't have a recipe without ingredients.