[PR #4982] [MERGED] Pass the short names test a slice, which clippy asks for #5988

Closed
opened 2026-11-03 05:16:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4982
Author: @navinor
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/horizon-threads-useless-vec


📝 Commits (1)

  • 819cd2e Pass the short names test a slice, which clippy asks for

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 crates/horizon-threads/src/lib.rs (+1 -1)

📄 Description

🤖 Opened by navinor's AI agent (OpenCode, Claude Opus 5.5), not by navinor personally.

What and why

cargo clippy --workspace --all-targets --locked -- -D warnings fails on origin/main at crates/horizon-threads/src/lib.rs:438:

error: useless use of `vec!`
   --> crates\horizon-threads\src\lib.rs:438:43
    |
438 |         assert!(super::mount_point_buffer(&vec![0; 100]).is_ok());
    |                                           ^^^^^^^^^^^^^ help: you can use a slice directly: `&[0; 100]`

The call takes &[u16], so a slice is the same input without the temporary Vec. This is the only change; it lets the workspace clippy step (and tools/pr_ready.py) pass again.

Kind

  • tooling: tools, CI, tests, harnesses

Vanilla reference

None: this changes only a test's argument from a Vec to a slice.

Other projects' code

None.

Self-check

pr_ready (tools/pr_ready.py --quick on Aaron, against origin/main at 4de90a13d, 2 min 19 s)

Check Result
Scope ✅ 1 files, +1 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (1 min 4 s)
rustfmt ✅ (12 s)
clippy ✅ (1 min 0 s)
tests: horizon-threads ✅ 6 passed
doc tests ✅ 0 passed
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with OpenCode


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4982 **Author:** [@navinor](https://github.com/navinor) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/horizon-threads-useless-vec` --- ### 📝 Commits (1) - [`819cd2e`](https://github.com/horizon-rust/horizon/commit/819cd2eebc2376cdcc200dab68b0054ab0e491ce) Pass the short names test a slice, which clippy asks for ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-threads/src/lib.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by navinor's AI agent (OpenCode, Claude Opus 5.5), not by navinor personally. ## What and why `cargo clippy --workspace --all-targets --locked -- -D warnings` fails on `origin/main` at `crates/horizon-threads/src/lib.rs:438`: ``` error: useless use of `vec!` --> crates\horizon-threads\src\lib.rs:438:43 | 438 | assert!(super::mount_point_buffer(&vec![0; 100]).is_ok()); | ^^^^^^^^^^^^^ help: you can use a slice directly: `&[0; 100]` ``` The call takes `&[u16]`, so a slice is the same input without the temporary `Vec`. This is the only change; it lets the workspace clippy step (and `tools/pr_ready.py`) pass again. ## Kind - [x] tooling: tools, CI, tests, harnesses ## Vanilla reference None: this changes only a test's argument from a `Vec` to a slice. ## Other projects' code None. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Aaron, against origin/main at 4de90a13d, 2 min 19 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +1 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (1 min 4 s) | | rustfmt | ✅ (12 s) | | clippy | ✅ (1 min 0 s) | | tests: horizon-threads | ✅ 6 passed | | doc tests | ✅ 0 passed | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [OpenCode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:16:26 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5988
No description provided.