[PR #5931] [MERGED] Fix main's clippy: needless borrow in BlockProperties::from_shared #6568

Closed
opened 2026-11-03 06:23:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5931
Author: @ludovic111
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/props-needless-borrow


📝 Commits (1)

  • 4a6ed63 Fix clippy's needless borrow in BlockProperties::from_shared

📊 Changes

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

View changed files

📝 crates/horizon-world/src/block_state_properties.rs (+1 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

main's checks / verify fails since #5915 (merge 5bbecdc49): clippy's needless_borrow in BlockProperties::from_shared, where the pairs are &'static Strings and the sort compared a.0 with &b.0. The fix drops the extra borrow; nothing else changes.

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> crates/horizon-world/src/block_state_properties.rs:161:38
161 |         pairs.sort_by(|a, b| a.0.cmp(&b.0));

Tests

  • cargo clippy --workspace --all-targets -- -D warnings (clippy 0.1.99, the CI version) and cargo fmt --check: clean on the Mac.

🤖 Generated with Claude Code


🔄 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/5931 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/props-needless-borrow` --- ### 📝 Commits (1) - [`4a6ed63`](https://github.com/horizon-rust/horizon/commit/4a6ed638b3632fa16a4ccbbb2a2866ec79a270f8) Fix clippy's needless borrow in BlockProperties::from_shared ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/block_state_properties.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What main's `checks / verify` fails since #5915 (merge 5bbecdc49): clippy's `needless_borrow` in `BlockProperties::from_shared`, where the pairs are `&'static String`s and the sort compared `a.0` with `&b.0`. The fix drops the extra borrow; nothing else changes. ``` error: this expression creates a reference which is immediately dereferenced by the compiler --> crates/horizon-world/src/block_state_properties.rs:161:38 161 | pairs.sort_by(|a, b| a.0.cmp(&b.0)); ``` ## Tests - `cargo clippy --workspace --all-targets -- -D warnings` (clippy 0.1.99, the CI version) and `cargo fmt --check`: clean on the Mac. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:23:11 +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#6568
No description provided.