KokaKiwi / rust-hex

A basic crate to encode values to hexadecimal representation. Originally extracted from rustc-serialize.
https://crates.io/crates/hex
Apache License 2.0
201 stars 55 forks source link

Make Sized optional in FromHex trait #25

Closed loriopatrick closed 5 years ago

loriopatrick commented 5 years ago

Better supports fixed types such as [u8; 32] by allowing the compiler to determine the data type's size.

loriopatrick commented 5 years ago

Looks like the compiler doesn't support this feature.... huh. Going to do some local testing.

LukasKalbertodt commented 5 years ago

It's ?Sized not Sized?. Though I'm not sure what you are trying to achieve with this change exactly. Even with : ?Sized it wouldn't compile as the only method returns Self by value which is only allowed when Self is Sized.