fix(clippy): code style — From/Into, derives, naming, borrows, casts#16
Merged
Conversation
0af9acf to
f3368f9
Compare
tmthecoder
reviewed
Apr 4, 2026
tmthecoder
reviewed
Apr 4, 2026
- Convert impl Into<u64> to impl From for u64 (command_code.rs) - Derive Default for SMBShareType, add Default impls for SMBErrorResponse and SMBIPCShare - Rename IPC() to ipc() for snake_case convention - Remove unnecessary borrows, derefs, and same-type casts - Remove unneeded return statements - Use iterator instead of index loop in des.rs - Use Entry API instead of contains_key+insert in server open table Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove leftover #[allow(dead_code)] on SMBServer - Replace #[allow(clippy::type_complexity)] with type aliases - Use `Entry` import instead of fully-qualified path - Restore FileAttributes TODO struct removed in error Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ype alias Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1beb159 to
34bd241
Compare
Define LockedSMBOpen, LockedSMBSession, and SMBLeaseTableOf in their own files (open.rs, session.rs, lease.rs) instead of mod.rs. This keeps type aliases co-located with the types they wrap. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tmthecoder
approved these changes
Apr 4, 2026
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.
Summary
impl Into<u64>toimpl From<...> for u64DefaultforSMBShareType, addDefaultimpls forSMBErrorResponseandSMBIPCShareIPC()toipc()for snake_case conventionreturnstatementsdes.rsEntryAPI instead ofcontains_key+insertPart 2 of 3 — stacked on PR 1.
Test plan
cargo test --lib --features server— 53 tests pass🤖 Generated with Claude Code