Repository navigation
Conversation
`blake3::hash(..).to_hex().to_string()` allocated a String only to borrow it as `&str`. Stable clippy flags this as `unnecessary_to_owned`, which fails the CI clippy command (`-D warnings`) and therefore the pre-commit hook for every Rust change on develop. Borrow the hex string directly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KxExJcGw13DnHknGTMAhXY
Merged
2 of 3 tasks
Member
Author
|
Closing: Generated by Claude Code |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
No linked issue. Found while running the CI clippy command for the data-flow fix series (#1544, #1553, #1557 and follow-ups).
What
lib/src/db/website.rs(test module, line 402) calledblake3::hash(..).to_hex().to_string()and then borrowed the result as&str. Stable clippy flags this asunnecessary_to_owned, sofails on
develop, and with it the Husky pre-commit hook for every Rust change. This borrows the hex string directly (.to_hex().as_str()).Testing
unnecessary use of to_stringatwebsite.rs:402; with it,Finishedwith exit 0.cargo test -p atomic_lib --features db-redb --lib -- website: 3 passed.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01KxExJcGw13DnHknGTMAhXY
Generated by Claude Code