Use newtype pattern to solve parameter mixup #1617
Labels
globex
refactoring
Refactor code without adding features
technical debt
unclean code and design flaws
Milestone
Brief feature description
One can easily mix up seconds and nanoseconds in function arguments since the underlying type is the same. This can be fixed at compile time by using the newtype pattern and create two distinct non convertable types with the same properties as before.
Extracted from: #1196
The text was updated successfully, but these errors were encountered: