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).
This commit is contained in:
parent
ba14a836c7
commit
72a25d05bf
177 changed files with 724 additions and 734 deletions
|
@ -64,7 +64,7 @@ fn signal_reported_right() {
|
|||
p.kill().unwrap();
|
||||
match p.wait().unwrap().signal() {
|
||||
Some(9) => {}
|
||||
result => panic!("not terminated by signal 9 (instead, {:?})", result),
|
||||
result => panic!("not terminated by signal 9 (instead, {result:?})"),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -252,8 +252,7 @@ fn test_override_env() {
|
|||
|
||||
assert!(
|
||||
output.contains("RUN_TEST_NEW_ENV=123"),
|
||||
"didn't find RUN_TEST_NEW_ENV inside of:\n\n{}",
|
||||
output
|
||||
"didn't find RUN_TEST_NEW_ENV inside of:\n\n{output}",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -265,8 +264,7 @@ fn test_add_to_env() {
|
|||
|
||||
assert!(
|
||||
output.contains("RUN_TEST_NEW_ENV=123"),
|
||||
"didn't find RUN_TEST_NEW_ENV inside of:\n\n{}",
|
||||
output
|
||||
"didn't find RUN_TEST_NEW_ENV inside of:\n\n{output}"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -288,13 +286,11 @@ fn test_capture_env_at_spawn() {
|
|||
|
||||
assert!(
|
||||
output.contains("RUN_TEST_NEW_ENV1=123"),
|
||||
"didn't find RUN_TEST_NEW_ENV1 inside of:\n\n{}",
|
||||
output
|
||||
"didn't find RUN_TEST_NEW_ENV1 inside of:\n\n{output}"
|
||||
);
|
||||
assert!(
|
||||
output.contains("RUN_TEST_NEW_ENV2=456"),
|
||||
"didn't find RUN_TEST_NEW_ENV2 inside of:\n\n{}",
|
||||
output
|
||||
"didn't find RUN_TEST_NEW_ENV2 inside of:\n\n{output}"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue