-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove asserts that block re-assignment. Re: #16
The asserts removed in this commit all follow the pattern: assert_eq!(some_struct.member, DEFAULT_VAL); These asserts seem to only exist for preventing re-assignment of struct values if they have already been assigned. This doesn't match what the builder pattern usually does in rust. Rather than implementing an error for this case, and giving these methods the signature: fn setter(self, val) -> Resutl<Self, Error::ReAssignment> I removed the asserts to retain the standard builder pattern signature: fn setter(self, val) -> Self Signed-off-by: Erich Heine <[email protected]>
- Loading branch information
Showing
3 changed files
with
3 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters