diff options
| author | T-O-R-U-S <bageliq@protonmail.com> | 2022-02-12 23:16:17 +0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-03-10 10:23:40 -0500 |
| commit | 72a25d05bf1a4b155d74139ef700ff93af6d8e22 (patch) | |
| tree | 3f143b29a3a51b68e9b29d93e47fb0b0968ad3df /library/test/src/cli.rs | |
| parent | ba14a836c7038da21f5e102aacc7e6d5964f79a6 (diff) | |
| download | rust-72a25d05bf1a4b155d74139ef700ff93af6d8e22.tar.gz rust-72a25d05bf1a4b155d74139ef700ff93af6d8e22.zip | |
Use implicit capture syntax in format_args
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
Diffstat (limited to 'library/test/src/cli.rs')
| -rw-r--r-- | library/test/src/cli.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/test/src/cli.rs b/library/test/src/cli.rs index b39701a3d42..000f5fa3f58 100644 --- a/library/test/src/cli.rs +++ b/library/test/src/cli.rs @@ -149,7 +149,7 @@ fn optgroups() -> getopts::Options { } fn usage(binary: &str, options: &getopts::Options) { - let message = format!("Usage: {} [OPTIONS] [FILTERS...]", binary); + let message = format!("Usage: {binary} [OPTIONS] [FILTERS...]"); println!( r#"{usage} @@ -360,7 +360,7 @@ fn get_shuffle_seed(matches: &getopts::Matches, allow_unstable: bool) -> OptPart shuffle_seed = match env::var("RUST_TEST_SHUFFLE_SEED") { Ok(val) => match val.parse::<u64>() { Ok(n) => Some(n), - Err(_) => panic!("RUST_TEST_SHUFFLE_SEED is `{}`, should be a number.", val), + Err(_) => panic!("RUST_TEST_SHUFFLE_SEED is `{val}`, should be a number."), }, Err(_) => None, }; |
