Skip to content

Commit baddc20

Browse files
committed
Make stable Clippy happy.
It seems preferable to have a clean CI based on stable Clippy, than to accomodate a not-yet-released version.
1 parent 58e829f commit baddc20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
448448
ID: IntoDimension<Dim = D>,
449449
{
450450
let dims = dims.into_dimension();
451-
let data_ptr = data_ptr.unwrap_or(boxed_slice.as_ptr());
451+
let data_ptr = data_ptr.unwrap_or_else(|| boxed_slice.as_ptr());
452452
let container = SliceBox::new(boxed_slice);
453453
let cell = pyo3::PyClassInitializer::from(container)
454454
.create_cell(py)

0 commit comments

Comments
 (0)