orion icon indicating copy to clipboard operation
orion copied to clipboard

Considering removing `from_slice` from newtype APIs

Open brycx opened this issue 2 years ago • 1 comments

Since the introduction of serde support, most newtypes implement TryFrom<&[u8]> which simply delegates to from_slice(). This seems a bit redundant, especially if/when moving to Rust 2021 Edition, where TryFrom/TryInto are part of prelude. We could consider removing from_slice in the future and simply provide TryFrom only instead.

brycx avatar Nov 24 '21 19:11 brycx

See also #237

brycx avatar Nov 24 '21 19:11 brycx