-
Notifications
You must be signed in to change notification settings - Fork 57
Implement Pow #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Pow #21
Conversation
Fixed compile errors; this only increases compile time by .1s on my box so I think this is fine. |
src/lib.rs
Outdated
Pow::pow(self.clone(), expon) | ||
} | ||
} | ||
impl<'a, T: Clone + Integer + Pow<$unsigned, Output = T>> Pow<&'a $exp> for Ratio<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not need Clone
, does it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything requires Clone
, even Ratio::new
. I'd prefer to keep it for now. We could someday relax this without it being a breaking change, but not the other way.
This looks good, however it would be nice to have some tests. |
Updated the existing bors r+ |
Build failed |
Travis timeout without even starting our job. bors r+ |
Build succeeded |
Should be merged after #19, as this PR depends on that one. Fixes #20.
Will need to investigate compile time increases that this change causes.