Skip to content

API breaking changes when updating ron 0.8 -> 0.10 #258

@flihp

Description

@flihp

ron is only used in the yhsm-audit which is barely a WIP so low impact

error[E0277]: the trait bound `W: std::fmt::Write` is not satisfied
   --> yhsm-audit/src/main.rs:228:13
    |
227 |         Encoding::Ron => ser::to_writer_pretty(
    |                          --------------------- required by a bound introduced by this call
228 |             writer.borrow_mut(),
    |             ^^^^^^^^^^^^^^^^^^^ the trait `std::fmt::Write` is not implemented for `W`
    |
    = note: required for `&mut W` to implement `std::fmt::Write`
note: required by a bound in `ron::ser::to_writer_pretty`
   --> /home/flihp/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ron-0.10.1/src/ser/mod.rs:36:8
    |
34  | pub fn to_writer_pretty<W, T>(writer: W, value: &T, config: PrettyConfig) -> Result<()>
    |        ---------------- required by a bound in this function
35  | where
36  |     W: fmt::Write,
    |        ^^^^^^^^^^ required by this bound in `to_writer_pretty`
help: consider further restricting type parameter `W` with trait `Write`
    |
214 | fn serialize<T: Serialize, W: Write + std::fmt::Write>(
    |                                     +++++++++++++++++

For more information about this error, try `rustc --explain E0277`.
error: could not compile `yubihsm-audit` (bin "yubihsm-audit") due to 1 previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions