Skip to content

Commit b1077d6

Browse files
committed
ixdyn: Update Default for Array documentation for IxDyn change
1 parent 93f09aa commit b1077d6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/arraytraits.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,11 @@ impl<'a, A: 'a, D, T> AsArray<'a, A, D> for T
304304
///
305305
/// The array is created with dimension `D::default()`, which results
306306
/// in for example dimensions `0` and `(0, 0)` with zero elements for the
307-
/// one-dimensional and two-dimensional cases respectively, while for example
308-
/// the zero dimensional case uses `()` (or `Vec::new()`) which
309-
/// results in an array with one element.
307+
/// one-dimensional and two-dimensional cases respectively.
308+
///
309+
/// The default dimension for `IxDyn` is `IxDyn(&[0])` (array has zero
310+
/// elements). And the default for the dimension `()` is `()` (array has
311+
/// one element).
310312
///
311313
/// Since arrays cannot grow, the intention is to use the default value as
312314
/// placeholder.

0 commit comments

Comments
 (0)