Skip to content

chore(clippy): clear cloned_ref_to_slice_refs in niubash-runtime (#450 parallel batch) - #476

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/450
Oct 20, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/450

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Parallel clippy-clearing batch per #450 — independent of other in-flight batches.

Category

clippy::cloned_ref_to_slice_refs — replace &[x.clone()] slice literals with std::slice::from_ref(&x) so no clone is taken just to build a one-element slice.

Before / after (rustc 1.99.0, cargo clippy --all-targets -p niubash-runtime --locked)

Metric Before After
cloned_ref_to_slice_refs sites 11 0
Total clippy warning emissions 174 163
Unique warning sites (all lints) 105 94

Sites cleared

  • crates/niubash-runtime/src/plugins/sources.rs (2, test module)
  • crates/niubash-runtime/src/shortcut.rs (5, test module)
  • crates/niubash-runtime/tests/completion.rs (4, integration test)

All fixes are in test code; no production behavior changes.

Verification

  • cargo fmt --check -p niubash-runtime — clean
  • cargo clippy --all-targets -p niubash-runtime --locked — cloned_ref_to_slice_refs count 0, no new warnings
  • cargo test -p niubash-runtime --test completion --locked — 10/10 pass
  • cargo test -p niubash-runtime --lib --locked -- shortcut:: plugins::sources:: — 42/42 pass

Refs #450

Generated with Devin

…parallel batch)

Refs #450.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@caomengxuan666
caomengxuan666 merged commit 16a7fb3 into master Oct 20, 2026
10 of 11 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/450 branch October 21, 2026 08:16
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.

1 participant