oxidecomputer / amd-apcb

AMD Generic Encapsulated Software Architecture Platform Security Processor Configuration Block manipulation library
Mozilla Public License 2.0
13 stars 1 forks source link

ondisk: Fix "unused std::fmt" warning #44

Closed daym closed 2 years ago

daym commented 2 years ago

This fixes an annoying "unused import" warning.

daym commented 2 years ago

If feature serde-hex is disabled, the macro make_serde_hex is unused and thus there's no usage site of fmt::Formatter in the resulting source after macro expansion.

However, the use std::fmt is only feature gated on std, not on serde-hex.

Instead of complicating the feature gate on the use statement I opted to just fully qualify the std::fmt::Formatter at the usage site.