fix(clippy): suppress macro-generated and complex type warnings#17
Merged
Conversation
0af9acf to
f3368f9
Compare
7ef60ad to
c76473c
Compare
- 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
c76473c to
6464c09
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>
6464c09 to
ee6e749
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ee6e749 to
d36c183
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add #![allow(clippy::manual_is_multiple_of)] for smb-derive generated code - Add #[allow(clippy::type_complexity)] on complex generic fields - Add #[allow(clippy::duplicated_attributes)] on SMBSyncHeader - Add #[allow(clippy::upper_case_acronyms)] on IOCTL/FSCTL variants - Add #[allow(clippy::result_large_err)] on smb-derive functions - Fix collapsed if and from_ref in smb-derive - Make PosixExtensions pub to fix privacy lint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d36c183 to
5e741b1
Compare
Update alignment checks in smb-derive macro codegen and smb-core to use .is_multiple_of() instead of % != 0 patterns. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SMBServer's 5 generic params make field types inherently complex. Clippy expands type aliases when scoring, so aliases don't help here. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…_err Box the TypeError variant in SMBDeriveError to keep Result small, removing all #[allow(clippy::result_large_err)] annotations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace per-item allows with a crate-level #![allow(clippy::type_complexity)] and add a TODO to reduce SMBServer generic params. 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
#![allow(clippy::manual_is_multiple_of)]for smb-derive generated code#[allow(clippy::type_complexity)]on complex generic fields#[allow(clippy::duplicated_attributes)]onSMBSyncHeader#[allow(clippy::upper_case_acronyms)]onIOCTL/FSCTLvariants#[allow(clippy::result_large_err)]on smb-derive functionsifandfrom_refin smb-derivePosixExtensionspub to fix privacy lintPart 3 of 3 — stacked on PR 2. With all 3 merged,
cargo clippy --workspace --features server -- -D warningspasses with zero errors.Test plan
cargo clippy --workspace --features server -- -D warnings— zero errorscargo test --lib --features server— 53 tests pass🤖 Generated with Claude Code