Skip to content

fix(clippy): suppress macro-generated and complex type warnings#17

Merged
tmthecoder merged 11 commits into
mainfrom
fix/clippy-3-macro-suppressions
Apr 4, 2026
Merged

fix(clippy): suppress macro-generated and complex type warnings#17
tmthecoder merged 11 commits into
mainfrom
fix/clippy-3-macro-suppressions

Conversation

@tejas-claude-bot
Copy link
Copy Markdown
Contributor

Summary

  • #![allow(clippy::manual_is_multiple_of)] for smb-derive generated code
  • #[allow(clippy::type_complexity)] on complex generic fields
  • #[allow(clippy::duplicated_attributes)] on SMBSyncHeader
  • #[allow(clippy::upper_case_acronyms)] on IOCTL/FSCTL variants
  • #[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

Part 3 of 3 — stacked on PR 2. With all 3 merged, cargo clippy --workspace --features server -- -D warnings passes with zero errors.

Test plan

  • cargo clippy --workspace --features server -- -D warnings — zero errors
  • cargo test --lib --features server — 53 tests pass

🤖 Generated with Claude Code

@tmthecoder tmthecoder force-pushed the fix/clippy-2-code-style branch from 0af9acf to f3368f9 Compare April 4, 2026 21:15
@tmthecoder tmthecoder force-pushed the fix/clippy-3-macro-suppressions branch 3 times, most recently from 7ef60ad to c76473c Compare April 4, 2026 21:27
tejas-claude-bot Bot and others added 3 commits April 4, 2026 17:28
- 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>
@tmthecoder tmthecoder force-pushed the fix/clippy-2-code-style branch from 1beb159 to 34bd241 Compare April 4, 2026 21:28
@tmthecoder tmthecoder force-pushed the fix/clippy-3-macro-suppressions branch from c76473c to 6464c09 Compare April 4, 2026 21:28
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>
@tmthecoder tmthecoder force-pushed the fix/clippy-3-macro-suppressions branch from 6464c09 to ee6e749 Compare April 4, 2026 21:37
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tmthecoder tmthecoder force-pushed the fix/clippy-3-macro-suppressions branch from ee6e749 to d36c183 Compare April 4, 2026 21:42
tejas-claude-bot Bot and others added 2 commits April 4, 2026 17:45
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>
@tmthecoder tmthecoder force-pushed the fix/clippy-3-macro-suppressions branch from d36c183 to 5e741b1 Compare April 4, 2026 21:45
Base automatically changed from fix/clippy-2-code-style to main April 4, 2026 21:48
tejas-claude-bot Bot and others added 4 commits April 4, 2026 17:54
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 tmthecoder merged commit 526816c into main Apr 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant