Skip to content

sha2: document migration path (if any) for users of the Write trait after v0.11 #814

@aochagavia

Description

@aochagavia

The following code works on 0.10, but fails to compile on 0.11:

let mut hasher = Sha256::new();
serde_json::to_writer(&mut hasher, &some_serializable_object).unwrap();

It seems like Sha256 no longer implements the std::io::Write trait. Is there some cleaner workaround than creating a newtype wrapping Sha256 and implementing Write for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions