mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 11:33:04 +00:00
Don't panic if there's no command line arguments
This commit is contained in:
parent
b6d91a2bda
commit
6514c3ab16
@ -50,7 +50,7 @@ fn main() {
|
||||
let mut term = Term::new();
|
||||
let cmd = os::args();
|
||||
|
||||
if cmd.len() < 1 {
|
||||
if cmd.len() <= 1 {
|
||||
help::usage()
|
||||
} else {
|
||||
match subcommand::parse_name(&cmd[1][]) {
|
||||
|
Loading…
Reference in New Issue
Block a user