Is there a shorter way of getting multiple argv inputs using only stdlib? This is what I've got now; not loving it.pic.twitter.com/7gLmuLZgDD
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Could you share an example? Thought the same, but I'm having trouble making it work with Vec -> Slice conversions.
fn main() { let v = vec![ 1, 2, 3, 4, 5]; if let [a, b, ..] = *v {}; }
As a vec contains a pointer to a slice and usually implicitly derefs to it for many operations, explicitly snarling "DEREF, you heap of integers!" at it elicits its compliance here.
yapp, NVM, I thought something like this could work, but the compiler is to smart. fn main() { let &[a,b, ..] = std::env::args().collect::<Vec<_>>().as_slice(); }
now I'm actually looking for something like .take() but which returns Options and hands out Nones if I pass by the end of the original iterator
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.