File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,14 @@ impl Args {
32
32
"--version" => args. display_version = true ,
33
33
"--help" => args. display_help = true ,
34
34
"--tutor" => args. load_tutor = true ,
35
- "--vsplit" => args. split = Some ( Layout :: Vertical ) ,
36
- "--hsplit" => args. split = Some ( Layout :: Horizontal ) ,
35
+ "--vsplit" => match args. split {
36
+ Some ( _) => anyhow:: bail!( "can only set a split once of a specific type" ) ,
37
+ None => args. split = Some ( Layout :: Vertical ) ,
38
+ } ,
39
+ "--hsplit" => match args. split {
40
+ Some ( _) => anyhow:: bail!( "can only set a split once of a specific type" ) ,
41
+ None => args. split = Some ( Layout :: Horizontal ) ,
42
+ } ,
37
43
"--health" => {
38
44
args. health = true ;
39
45
args. health_arg = argv. next_if ( |opt| !opt. starts_with ( '-' ) ) ;
You can’t perform that action at this time.
0 commit comments