mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 00:41:07 +01:00
refactor(cli): simplify output_paths w/ <&[T]>::get and Option::unwrap (#2114)
This commit is contained in:
1 parent
01fbdea21f
commit
1650581fe7
1 file changed
+1
-5
+1
-5
@@ -231,11 +231,7 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
} else {
|
||||
return Err(CliError("Input file path is not specified").into());
|
||||
};
|
||||
let output_paths = if !args.files.is_empty() {
|
||||
&args.files[1..]
|
||||
} else {
|
||||
&[]
|
||||
};
|
||||
let output_paths = args.files.get(1..).unwrap_or(&[]);
|
||||
|
||||
// Update parameters from commandline arguments
|
||||
if let Some(bits) = args.validate {
|
||||
|
||||
Reference in new issue
Block a user