Skip to content

clippy: fix lints from Rust 1.100 - #339

Closed
shahmeerabdul wants to merge 1 commit into
mnemosyne-systems:mainfrom
shahmeerabdul:clippy-rust-1-100
Closed

shahmeerabdul wants to merge 1 commit into
mnemosyne-systems:mainfrom
shahmeerabdul:clippy-rust-1-100

Conversation

@shahmeerabdul

Copy link
Copy Markdown

The lint job started failing on main and on every open PR after Rust 1.100 came out on Nov 9, since CI installs the latest stable. The new clippy flags two things:

  • duplicated_attributes: #[allow(clippy::too_many_arguments)] is written twice on forward_full_attn_layer and apply_ffn in qwen_hybrid.rs, and on norm_pair_bind_group and rope_meta_buffer in vulkan.rs. I removed the extra one each time. In norm_pair_bind_group the extra one sat in the middle of the doc comment, so the comment is back in one piece now.
  • needless_range_loop: two tests looped over an index just to read an array. draft_control.rs now goes over accept_bin directly, and kv_cache.rs uses iter().enumerate().take(2) so it still checks the same two layers.

No behaviour changes, only those six spots. With Rust 1.100, cargo fmt --all --check and cargo clippy --all-targets -- -D warnings are clean, and the two tests still pass.

I noticed it on #337, where only the lint job was red for code that PR doesn't touch.

Rust 1.100 clippy flags duplicated attributes and loops that only index
an array, which fails the lint job on main and every open PR. Drop the
repeated too_many_arguments allows and iterate the arrays directly in
the two tests.
@shahmeerabdul

Copy link
Copy Markdown
Author

@jesperpedersen

@shahmeerabdul

Copy link
Copy Markdown
Author

Closing this, it's already fixed on main in c97ffd6.

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