-
Notifications
You must be signed in to change notification settings - Fork 0
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
Murisi/generic unextended checked traits #1
base: master
Are you sure you want to change the base?
Conversation
type Output = $t; | ||
#[inline] | ||
fn $method(self, v: &$t) -> Option<$t> { | ||
<$t>::$method(self, *v) |
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.
doesn't this force the $t
to be Copy
?
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.
I guess that assumption was already present in the existing code. I see it used below
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.
yeah, it's fine to assume we only care about copyable types I think
Adjusted num-traits so that the checked traits are now generic and so that they do not depend on their unchecked equivalents. Given the new use of generic, the traits are now defined for both reference and value types.