Skip to content

Fix tonic conversion clippy warnings#122

Merged
RAprogramm merged 1 commit intonew_versionfrom
eye_of_ra/fix-infallible-tryfrom-implementation
Sep 24, 2025
Merged

Fix tonic conversion clippy warnings#122
RAprogramm merged 1 commit intonew_versionfrom
eye_of_ra/fix-infallible-tryfrom-implementation

Conversation

@RAprogramm
Copy link
Owner

Summary

  • switch the tonic adapter to an infallible From<Error> conversion while keeping TryFrom available via a documented StatusConversionError
  • tighten metadata handling and bool serialization in the tonic converter and simplify the AppResult alias test to satisfy clippy
  • bump the crate to v0.20.5 and document the release details in the changelog and README

Testing

  • cargo +nightly fmt --
  • cargo +1.90.0 clippy -- -D warnings
  • cargo +1.90.0 build --all-targets
  • cargo +1.90.0 test --all
  • cargo +1.90.0 doc --no-deps
  • cargo deny check
  • cargo audit

https://chatgpt.com/codex/tasks/task_e_68d37fa0a7f4832b83abf875fd599810

@RAprogramm RAprogramm merged commit e559fca into new_version Sep 24, 2025
1 of 2 checks passed
@RAprogramm RAprogramm deleted the eye_of_ra/fix-infallible-tryfrom-implementation branch September 24, 2025 05:47
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines 73 to +77
impl TryFrom<Error> for Status {
type Error = Infallible;
type Error = StatusConversionError;

fn try_from(error: Error) -> Result<Self, Self::Error> {
Ok(status_from_error(&error))
Ok(Status::from(error))

Choose a reason for hiding this comment

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

[P1] Avoid breaking TryFrom error type in patch release

The new TryFrom<Error> for Status now exposes type Error = StatusConversionError instead of the previous Infallible. Even though the conversion still never fails, changing this associated type is a breaking public API change: existing callers that return Result<Status, Infallible> or use ? on Status::try_from(err) will stop compiling when they upgrade from 0.20.4 to 0.20.5. Clippy’s infallible-conversion lint can be satisfied by adding impl From<Error> for Status while leaving the TryFrom error type as Infallible, which preserves backward compatibility.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant