Skip to content

Evidence::decode from Read + build and clippy fixes#38

Merged
thomas-fossati merged 2 commits intomainfrom
lint
May 7, 2025
Merged

Evidence::decode from Read + build and clippy fixes#38
thomas-fossati merged 2 commits intomainfrom
lint

Conversation

@setrofim
Copy link
Contributor

@setrofim setrofim commented May 7, 2025

Change Evidence::decode to accept a generic type that is Read. This allows for more flexibility in how this API is used, removing the need for additional conversions, and in some cases (e.g. when reading from a file), removing the need to created an intermediate buffer entirely.

Also, various build and clippy fixes:

  • Move imports that are only used by tests into the tests' modules.
  • Add missing #[cfg(test)] to tests modules.
  • allow(unexpected_cfgs) for modules that use bitmask! macro. This suppress a warning that originates from the bitmask crate.
  • Elide unused lifetime inside Visitor implementation.

- Move imports that are only used  by tests into the tests' modules.
- Add missing #[cfg(test)] to tests modules.
- allow(unexpected_cfgs) for modules that use bitmask! macro. This
  suppress a warning that originates from the bitmask crate.
- Elide unused lifetime inside Visitor implementation.
- Remove unused function.

Signed-off-by: setrofim <setrofim@gmail.com>
@setrofim setrofim changed the title fix: build and clippy warnings Evidence::decode from Read + build and clippy fixes May 7, 2025
Change Evidence::decode to accept a generic type that is Read. This
allows for more flexibility in how this API is used, removing the need
for additional conversions, and in some cases (e.g. when reading from
a file), removing the need to created an intermediate buffer entirely.

BREAKING_CHANGE: Signature of Evidence::decode is changed.

Signed-off-by: setrofim <setrofim@gmail.com>
Copy link
Contributor

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

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

thanks!

@thomas-fossati thomas-fossati merged commit decd908 into main May 7, 2025
4 checks passed
@thomas-fossati thomas-fossati deleted the lint branch May 7, 2025 13:36
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