Skip to content

Apply clippy suggestion#31

Merged
nuskey8 merged 2 commits intonuskey8:mainfrom
paq:clippy-1
Apr 17, 2026
Merged

Apply clippy suggestion#31
nuskey8 merged 2 commits intonuskey8:mainfrom
paq:clippy-1

Conversation

@paq
Copy link
Copy Markdown
Contributor

@paq paq commented Apr 10, 2026

fix #27

Copilot AI review requested due to automatic review settings April 10, 2026 03:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Resolves CI failures from Clippy warnings (issue #27) by applying suggested simplifications and removing redundant conversions.

Changes:

  • Simplified byte-slice writing/reading error mapping (map_err(Error::IoError)) and removed redundant temporaries.
  • Removed redundant numeric casts before to_be_bytes() in multiple MessagePack writer implementations.
  • Updated test/bench code to use more idiomatic Vec initialization and API call patterns.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
zerompk/tests/derive.rs Simplifies construction of recursive-node MessagePack test payload bytes.
zerompk/src/write.rs Removes redundant casts and simplifies error mapping in writers.
zerompk/src/read.rs Simplifies IO error mapping in IOReader::read_exact.
zerompk/src/lib.rs Removes unnecessary temporary variable in from_msgpack.
zerompk/src/impl.rs Simplifies ToMessagePack impls for references and &str.
zerompk/benches/deserialize_large_array.rs Simplifies buffer handling for msgpacker benchmark.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread zerompk/tests/derive.rs
@nuskey8 nuskey8 merged commit ec0884c into nuskey8:main Apr 17, 2026
5 of 6 checks passed
@nuskey8
Copy link
Copy Markdown
Owner

nuskey8 commented Apr 17, 2026

Merged the PR. thanks!

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.

Clippy warnings

3 participants