Skip to content

Commit c63c3e9

Browse files
committed
docs(dev-guide): update description of rustup::process
1 parent d5209e1 commit c63c3e9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

doc/dev-guide/src/coding-standards.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ though that is helpful.
2727
## No direct use of process state outside rustup::process
2828

2929
The `rustup::process` module abstracts the global state that is
30-
`std::env::args`, `std::env::vars`, `std::io::std*`, `std::process::id`,
31-
`std::env::current_dir` and `std::process::exit` permitting threaded tests of
32-
the CLI logic; use `process()` rather than those APIs directly.
30+
`std::env::args`, `std::env::vars`, `std::io::std*` and `std::env::current_dir`
31+
permitting threaded tests of the CLI logic; use the relevant methods of the
32+
`rustup::process::Process` type rather than those APIs directly.
33+
Usually, a `process: &Process` variable will be available to you in the current context.
34+
For example, it could be in the form of a parameter of the current function,
35+
or a field of a `Cfg` instance, etc.
3336

3437
## Clippy lints
3538

0 commit comments

Comments
 (0)