Skip to content

Consider deleting stdvec flavor #265

@dtolnay

Description

@dtolnay
  • postcard::to_stdvec is 100% equivalent to postcard::to_allocvec
  • postcard::to_stdvec_cobs is equivalent to postcard::to_allocvec_cobs
  • postcard::to_stdvec_crc32 is equivalent to postcard::to_allocvec_crc32
  • postcard::ser_flavors::StdVec is exactly the same type as postcard::ser_flavors::AllocVec

On every target platform, Rust compiler, and Cargo feature combination where someone can use a "stdvec" API, the identical "allocvec" API is also available and behaves exactly the same. Having 2 names for the same functionality bloats the API and misleadingly implies that there might be some difference.

It is possible that separating "stdvec" and "allocvec" used to make sense for compilers older than 1.36.0 (2019) where extern crate alloc was not yet stable, but this has not been the case since postcard 0.3.

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