Skip to content

Added trait From<T> for Ratio<T> where T: Clone + Integer #244

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

Merged
merged 2 commits into from
Dec 2, 2016

Conversation

wictory
Copy link
Contributor

@wictory wictory commented Dec 1, 2016

Hi!

So I thought that this kind of trait would be useful when one wants to write code which should be generic over different types of numbers.

@cuviper
Copy link
Member

cuviper commented Dec 1, 2016

Sure, looks reasonable to me. Could you add a quick test somewhere? Perhaps in test_test_constants.

@wictory
Copy link
Contributor Author

wictory commented Dec 1, 2016

Added.

@wictory
Copy link
Contributor Author

wictory commented Dec 1, 2016

Should I rebase?

@cuviper
Copy link
Member

cuviper commented Dec 1, 2016

I guess you mean squash -- but no, I don't mind if the PR has multiple commits.

Nightly CI is broken right now due to rust-lang/cargo#3340, but that should be resolved when a new nightly comes out, so I'm just going to wait on merging for a clean CI run.

@cuviper
Copy link
Member

cuviper commented Dec 2, 2016

@homu r+ 4bdad38

homu added a commit that referenced this pull request Dec 2, 2016
Added trait From<T> for Ratio<T> where T: Clone + Integer

Hi!

So I thought that this kind of trait would be useful when one wants to write code which should be generic over different types of numbers.
@homu
Copy link
Contributor

homu commented Dec 2, 2016

⌛ Testing commit 4bdad38 with merge dc8c8fc...

@homu
Copy link
Contributor

homu commented Dec 2, 2016

☀️ Test successful - status

@homu homu merged commit 4bdad38 into rust-num:master Dec 2, 2016
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.

3 participants