Advertisement
isolatedsheep

Untitled

Jun 30th, 2020
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.24 KB | None | 0 0
  1. use std::env;
  2.  
  3. fn main() {
  4.     let mut args = env::args();
  5.     let prog = args.next().unwrap();
  6.     let mut other = Vec::with_capacity(args.len() - 1);
  7.  
  8.     for a in args {
  9.         other.push(a);
  10.     }
  11.  
  12.     dbg!(prog);
  13.     dbg!(other);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement