Skip to content

Signature of rmp_serde::decode::from_read #127

@dtolnay

Description

@dtolnay

It should be:

fn from_read<R, T>(rd: R) -> Result<T, Error>
    where R: Read,
          T: DeserializeOwned

The current signature lets you try to deserialize &str and other borrow types and it fails at runtime instead of catching it at compile time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions