Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
51: Fix #49 r=cuviper a=maxbla fixed issue #49 added a test case for it Side note: `cmp` is a bit scary. Do we know what it's amortized runtime is? It seems to me that the worst case (having to compare the reciprocals many times) could be pretty bad. Is there any way to have a separate `impl` for `T: Clone + Integer + CheckedMul`? As the comments note, CheckedMul would make the implementation faster. I messed around, but I can't find a way to have two implementations -- one for checked and one for no checked. I found an [this](rust-lang/rfcs#586) RFC for negative trait bounds though (spoiler: negative trait bounds are not happening soon). Co-authored-by: Max Blachman <[email protected]>
- Loading branch information