Skip to content

Fix some clippy warnings#23

Merged
Luthaf merged 1 commit intomainfrom
clippy
Feb 12, 2026
Merged

Fix some clippy warnings#23
Luthaf merged 1 commit intomainfrom
clippy

Conversation

@Luthaf
Copy link
Member

@Luthaf Luthaf commented Feb 9, 2026

No description provided.

Copy link
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merge at will

src/ndarray.rs Outdated

let dl_tensor = sys::DLTensor {
data: ctx._array.as_ptr() as *mut _,
data: ctx._array.as_mut_ptr().cast(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah.

Calling a method for mutating elements on ArcArray, for example view_mut() or get_mut(), will break sharing and require a clone of the data (if it is not uniquely held).

Could this then be triggering a copy?

https://docs.rs/ndarray/latest/ndarray/type.ArcArray.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, very likely. But then we are back to the same core issue =)

@HaoZeke HaoZeke self-requested a review February 9, 2026 20:34
@Luthaf Luthaf merged commit 5ff3614 into main Feb 12, 2026
5 checks passed
@Luthaf Luthaf deleted the clippy branch February 12, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants