Created
October 12, 2018 06:39
-
-
Save yushulx/9efbce393ebc5b6ad6c6c5d3f0873cd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::env; | |
fn main() { | |
let args: Vec<String> = env::args().collect(); | |
if args.len() == 1 { | |
println!("Please input an image file."); | |
return | |
} | |
let file_name = env::args().nth(1).expect("Missing argument"); | |
println!("{}", file_name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment