| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add a public `from_slice` that returns `None` when the slice length does not match the type's dimensionality (`IxDyn` accepts any length). Now `from_dimension` uses `from_slice`
| Back | FazBrowse Home | New Git URL |
Closes #1330
Summary
Add Dimension::from_slice(&[Ix]) -> Option<Self>, which returns None when Self::NDIM.is_some_and(|n| n != ix.len()) (the fixed-size types require an exact length match and IxDyn accepts any length)
from_dimension now uses Self::from_slice(d.slice())
Tests
Added from_slice to tests/dimension.rs. cargo test passes.