Skip to content

Conversation

@Lucretiel
Copy link
Contributor

Various small code updates & refactors, focused on removing redundant asserts and deduplication.

Fixes #54

@mbrubeck
Copy link
Collaborator

This looks great, thanks! There are still a few type errors in some of the std::ops impls, though.

@Lucretiel
Copy link
Contributor Author

Lucretiel commented Nov 16, 2018 via email

@Lucretiel
Copy link
Contributor Author

Tests are passing, but I'm actually not sure if the refactored code is tested, might want to check that before merging

- Deduplicated implementations of `AddAssign`, `SubAssign`, etc
- Replaced `Into` implementations with equivelent `From` implementations
- Refactored most operators in terms of the "plain" versions:
    -`Add<Self> for NotNan<T>` is now based on `Add<T> for NotNan<T>`, etc.
- More efficient implementation of `Ord` for `NotNan`
- Removed many unnecessary asserts for `self.0.is_nan()`
- Fixes reem#54
@Lucretiel
Copy link
Contributor Author

Confirmed that the relevant tests do already exist

@mbrubeck mbrubeck merged commit 5850e60 into reem:master Nov 17, 2018
mbrubeck added a commit that referenced this pull request Mar 13, 2019
* Implement `FromStr` (#53)
* Internal refactoring (#55)
* Fix for `no_std` builds (#59)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants