stdweb icon indicating copy to clipboard operation
stdweb copied to clipboard

Array -> Vec conversion for array references

Open daboross opened this issue 7 years ago • 1 comments

Right now there's an implementation

impl<E: Into<ConversionError>, V: TryFrom<Value, Error = E>> TryFrom<Array> for Vec<V>

Unlike most of the other conversions, this unconditionally requires an owned Array. Could TryFrom<&'a Array> also be implemented for Vec?

I'd be happy to submit a PR if this would be OK to add. Just making an issue first to check and document.

For reference, I'm checking https://docs.rs/stdweb/0.4.8/stdweb/struct.Array.html.

daboross avatar Oct 05 '18 02:10 daboross

Yes that would be perfectly fine!

koute avatar Oct 05 '18 15:10 koute