Skip to content

clippy lints#75

Closed
lzrd wants to merge 8 commits intomainfrom
clippy
Closed

clippy lints#75
lzrd wants to merge 8 commits intomainfrom
clippy

Conversation

@lzrd
Copy link
Copy Markdown

@lzrd lzrd commented Dec 9, 2025

Mostly mechanical fixes: removing needless borrows, adding lifetime annotations, using modern numeric constants (i32::MAX), and suppressing warnings for dropshot-generated dead code.

Notable equivalences:

  • .as_bytes().len() to .len() on String: both return byte count
  • .trim().split_whitespace() to .split_whitespace(): split_whitespace already skips leading/trailing whitespace
  • .into_iter() to .iter() on slices: both yield &T

Mostly mechanical fixes: removing needless borrows, adding lifetime
annotations, using modern numeric constants (i32::MAX), and suppressing
warnings for dropshot-generated dead code.

Notable equivalences:
- .as_bytes().len() to .len() on String: both return byte count
- .trim().split_whitespace() to .split_whitespace(): split_whitespace
  already skips leading/trailing whitespace
- .into_iter() to .iter() on slices: both yield &T
Copy link
Copy Markdown
Collaborator

@jclulow jclulow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems broadly good! A few nits.

Comment thread agent/src/main.rs Outdated
Comment thread download/src/kinds/url.rs Outdated
Comment thread factory/gimlet/src/host.rs
Comment thread factory/gimlet/src/humility.rs Outdated
Comment thread github/dbtool/src/main.rs Outdated
Comment thread github/server/src/variety/basic.rs Outdated
Comment thread server/src/workers.rs Outdated
@jclulow jclulow changed the title Fix clippy warnings clippy lints Dec 9, 2025
lzrd and others added 6 commits December 10, 2025 09:37
Co-authored-by: Joshua M. Clulow <jmc@oxide.computer>
Co-authored-by: Joshua M. Clulow <jmc@oxide.computer>
Co-authored-by: Joshua M. Clulow <jmc@oxide.computer>
Co-authored-by: Joshua M. Clulow <jmc@oxide.computer>
Co-authored-by: Joshua M. Clulow <jmc@oxide.computer>
Co-authored-by: Joshua M. Clulow <jmc@oxide.computer>
@lzrd lzrd requested a review from jclulow December 10, 2025 17:42
@lzrd lzrd closed this Feb 11, 2026
@lzrd lzrd deleted the clippy branch February 11, 2026 19:38
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.

2 participants