Skip to content

Commit e7ca6d6

Browse files
committed
Fix clippy warnings
1 parent 18ddba8 commit e7ca6d6

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/data_traits.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ pub unsafe trait RawDataClone: RawData {
9494
pub unsafe trait Data: RawData {
9595
/// Converts the array to a uniquely owned array, cloning elements if necessary.
9696
#[doc(hidden)]
97+
#[allow(clippy::wrong_self_convention)]
9798
fn into_owned<D>(self_: ArrayBase<Self, D>) -> ArrayBase<OwnedRepr<Self::Elem>, D>
9899
where
99100
Self::Elem: Clone,
@@ -102,6 +103,7 @@ pub unsafe trait Data: RawData {
102103
/// Return a shared ownership (copy on write) array based on the existing one,
103104
/// cloning elements if necessary.
104105
#[doc(hidden)]
106+
#[allow(clippy::wrong_self_convention)]
105107
fn to_shared<D>(self_: &ArrayBase<Self, D>) -> ArrayBase<OwnedArcRepr<Self::Elem>, D>
106108
where
107109
Self::Elem: Clone,

src/impl_internal_constructors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ where
2525
/// See ArrayView::from_shape_ptr for general pointer validity documentation.
2626
pub(crate) unsafe fn from_data_ptr(data: S, ptr: NonNull<A>) -> Self {
2727
let array = ArrayBase {
28-
data: data,
29-
ptr: ptr,
28+
data,
29+
ptr,
3030
dim: Ix1(0),
3131
strides: Ix1(1),
3232
};

src/linalg/impl_linalg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ pub fn general_mat_vec_mul<A, S1, S2, S3>(
613613
///
614614
/// The caller must ensure that the raw view is valid for writing.
615615
/// the destination may be uninitialized iff beta is zero.
616+
#[allow(clippy::collapsible_if)]
616617
unsafe fn general_mat_vec_mul_impl<A, S1, S2>(
617618
alpha: A,
618619
a: &ArrayBase<S1, Ix2>,

0 commit comments

Comments
 (0)