FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow usage and borrow cleanups by RPG-Alex · Pull Request #1571 · rust-ndarray/ndarray · GitHub

Allow usage and borrow cleanups - #1571

Merged
akern40 merged 3 commits into
rust-ndarray:masterfrom
RPG-Alex:allow-and-borrow-cleanups
Jan 10, 2026
Merged

Allow usage and borrow cleanups#1571
akern40 merged 3 commits into
rust-ndarray:masterfrom
RPG-Alex:allow-and-borrow-cleanups

Conversation

RPG-Alex commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

I noticed several duplicated clippy::many_single_char_names allows across files, removed a few unnecessary uses of the vec! macro for literal values, and cleaned up some redundant clone() calls where the type implements Copy. I also elided one unnecessary lifetime annotation and removed a few cases of unnecessary borrowing. Also ran cargo fmt --all for good measure.

Comment thread tests/oper.rs Outdated
let a = a.map(|f| *f as f32);
let b = b.map(|f| *f as f32);
let a = a.map(|f| *f);
let b = b.map(|f| *f);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If this function is testing the dot product, those 2 lines are useless and should be removed. They are overwriting the arrays with the same arrays.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks. Good catch. Fixed.

akern40 commented Jan 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the cleanup. What were you using to catch all of these? Did you do it by hand? If there's a way to automate it, we should add it to the CI

akern40 merged commit 6fd0a9d into rust-ndarray:master Jan 10, 2026
15 checks passed

Copy link
Copy Markdown
Contributor Author

Thanks for the cleanup. What were you using to catch all of these? Did you do it by hand? If there's a way to automate it, we should add it to the CI

Hey, I actually run:
cargo clippy --all-targets --all-features -- -D warnings to get the most pedantic version of clippy (that I am aware of). That was the entry point for most of the small changes I made.

I didn't push it in the github workflow because it may be overly strict but I can add it if its desired

RPG-Alex deleted the allow-and-borrow-cleanups branch January 17, 2026 04:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL