-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Const generics Improvements #980
Conversation
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.
Nice work. Since this is a breaking change we need to resolve any 0.15.x changes before merging this.
Thanks, looks good. |
This is good and just waiting to be able to be integrated. After 0.15.x changes are resolved. No schedule, but it's more than a month until then. |
Just to note, that it's finally time to accept breaking changes 🙂 |
Add From impl to convert from 2D slices to 2D views Move NdIndex<IxDyn> implementations for arrays out of macros Remove FixedInitializer trait Make bounds checks in aview2 and aview_mut2 conditional on slices of ZSTs Refactor aview2 and aview_mut2 implementations into From
999ec8c
to
ad66360
Compare
src/arraytraits.rs
Outdated
use crate::iter::{Iter, IterMut}; | ||
use crate::NdIndex; | ||
use crate::{dimension, imp_prelude::*}; |
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 don't know what tool put this use here, but prelude-like imports should be on their own line, with a newline separating from the others.
tests/array.rs
Outdated
a.remove_index(Axis(0), 1); | ||
a.remove_index(Axis(1), 2); | ||
assert_eq!(a.shape(), &[3, 2]); | ||
assert_eq!(a, | ||
array![[1, 2], |
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.
Sorry to nitpick, but when the code is arranged to be easy to read (multiline array), it should not be reformatted.
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 have my editor set to automatically run rustfmt. I'll revert the format changes to this file.
Why are there CI Clippy errors in code I didn't change? |
clippy is using the beta branch, so it gets updates and sometimes finds new lints. Dont' bother with irrelevant clippy warnings |
CI passes for all steps except for Clippy. |
Thanks |
Adds the easy const generics improvements mentioned in #961. This includes implementation of
IntoNdProducer
,FixedInitializer
, andNdIndex<IxDyn>
for arrays as well asFrom
implementations for 2D slices (slices of higher dimensions is also possible).