Skip to content
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

Why not checked_pow as a trait method #254

Open
lemunozm opened this issue Jan 9, 2023 · 1 comment
Open

Why not checked_pow as a trait method #254

lemunozm opened this issue Jan 9, 2023 · 1 comment

Comments

@lemunozm
Copy link

lemunozm commented Jan 9, 2023

Hi!

This is only a design question about the current implementation of checked_pow as a function. Why is it implemented as a function instead of using a trait method as the rest of the checked operations?

I'm implementing a wrapper over these functions, and I want to know if you found some issues that forced you to implement it as a plain function.

Thanks!

@cuviper
Copy link
Member

cuviper commented Feb 10, 2023

I think that's just historical -- it was added way back in rust-num/num#162, when pow was also still only a function, not yet a trait.

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

No branches or pull requests

2 participants