-
Notifications
You must be signed in to change notification settings - Fork 666
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
feat(rank-collective): added new assoc. types #1245
Changes from all commits
dbdb056
8b0c006
8a6c5d6
a1d6f36
e2046cd
76e9281
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -540,6 +540,9 @@ morph_types! { | |
/// Morpher to disregard the source value and replace with another. | ||
pub type Replace<V: TypedGet> = |_| -> V::Type { V::get() }; | ||
|
||
/// Morpher to disregard the source value. | ||
pub type Ignore = |_| -> () {}; | ||
|
||
Comment on lines
+543
to
+545
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The naming is not really great and I don't think that we need this as a type here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed to |
||
/// Mutator which reduces a scalar by a particular amount. | ||
pub type ReduceBy<N: TypedGet> = |r: N::Type| -> N::Type { | ||
r.checked_sub(&N::get()).unwrap_or(Zero::zero()) | ||
|
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.
The comment is out of place now.