Rollup merge of #82163 - matthiaskrgr:slice, r=jyn514

avoid full-slicing slices

If we already have a slice, there is no need to get another full-range slice from that, just use the original.
clippy::redundant_slicing
This commit is contained in:
Guillaume Gomez 2021-02-16 19:21:20 +01:00 committed by GitHub
commit 46b93b2e44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 33 additions and 40 deletions

View file

@ -347,7 +347,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
};
// Done specifying what options are possible, so do the getopts parsing
let matches = opts.parse(&args[..]).unwrap_or_else(|e| {
let matches = opts.parse(args).unwrap_or_else(|e| {
// Invalid argument/option format
println!("\n{}\n", e);
usage(1, &opts, false, &subcommand_help);