You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now the only way to do this seems to be calling next().unwrap() on msg.into_iter(). But Vec provides a very nice way of doing this, and presumably more friendly to compiler optimizations:
let [a, b, c]: [Box<dyn Any>; 3] = msg.try_into().unwrap();
I wish this feature to make its way into ver 2.0
The text was updated successfully, but these errors were encountered:
This is an equivalent API of
TryFrom<Vec<T>> for [T; N]
which was stabilized in Rust 1.48.Reason:
When using the
smallvec
crate in a message-passing context, I often find I using it as a container for payloads with pre-determined length.Now the only way to do this seems to be calling
next().unwrap()
onmsg.into_iter()
. ButVec
provides a very nice way of doing this, and presumably more friendly to compiler optimizations:I wish this feature to make its way into ver 2.0
The text was updated successfully, but these errors were encountered: