Skip to content

lint: add #[expect(clippy::cast_possible_truncation)] to as usize casts in decode_item_payload #11

@coderabbitai

Description

@coderabbitai

Summary

The decode_item_payload function in src/journal/entry.rs (lines 209, 214, 223) contains as usize casts that are missing #[expect(clippy::cast_possible_truncation)] annotations, which are required for consistency with the project's Clippy guidelines.

The serialize_item_payload function (lines 114–122 of the same file) already has the correct annotations. The casts in decode_item_payload are pre-existing code moved from inline Item decoding to the shared helper in PR #3 without the annotation being added at that time.

Action

Add #[expect(clippy::cast_possible_truncation, reason = "...")] attributes to the three as usize casts in decode_item_payload in src/journal/entry.rs to match the pattern already used in serialize_item_payload.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions