Skip to content

Conversation

@setrofim
Copy link
Contributor

@setrofim setrofim commented Sep 2, 2025

  • Add conversions to/from basic types for TrustTier
  • Expose Byte's inner values to allow for literal instatiations
  • Add human-readable representations for Bytes and RawValue
  • Custom Debug implementation for TrustClaim that is more readable than the derived one
  • clippy and fmt fixes.

setrofim added 5 commits April 2, 2025 09:36
Implement the following traits for TrustTier to make it easier to
convert between it and primitive types:

TryFrom<&str>
TryFrom<i8>
From<TrustTier> for String
From<TrustTier> for i8
From<&TrustTier> for &str
From<&TrustTier> for i8

Serialization/deserialization code is also simplified using these
traits.

Signed-off-by: Sergei Trofimov <sergei.trofimov@arm.com>
This allows instantiating literal Bytes with

    Bytes(vec![...])

Signed-off-by: Sergei Trofimov <sergei.trofimov@arm.com>
Implement ToString for RawValue to allow it to be Displayed. This also
mean implementing ToString for Bytes (as it's one the variants of
RawValue).

Signed-off-by: Sergei Trofimov <sergei.trofimov@arm.com>
Implement the Debug trait for TrustClaim, rather than deriving
implementation. Derived implementation included all the fields in the
output, including the long-form description, which resulted in difficult
to parse output when looking at multiple claims (e.g. a TrustVector).

Signed-off-by: Sergei Trofimov <sergei.trofimov@arm.com>
- Replace ToString implementations with Display.
- Remove unnecessary to_string()'s in format arguments.
- Simplify some returns by removing unnecessary return's and Ok()
  wrappers.
- Layout according to fmt.

Signed-off-by: Sergei Trofimov <sergei.trofimov@arm.com>
As per Dependabot:

- update checkout action to v5
- update thiserror create to v2

Signed-off-by: Sergei Trofimov <sergei.trofimov@arm.com>
Signed-off-by: Sergei Trofimov <sergei.trofimov@arm.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.

LGTM, 🚢 it!

@setrofim setrofim merged commit cce6f84 into main Sep 2, 2025
4 checks passed
@setrofim setrofim deleted the rel-prep branch September 2, 2025 15:32
@setrofim setrofim restored the rel-prep branch September 2, 2025 15:32
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.

3 participants