diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-01-22 16:03:21 +0800 |
|---|---|---|
| committer | Jieyou Xu <jieyouxu@outlook.com> | 2025-01-29 08:11:01 +0000 |
| commit | 5f513a6a888b4d71d7949a7d6ff2688c86febd22 (patch) | |
| tree | 03f2d51dadaaff063ef7f21aee64dba73c95e3af /src | |
| parent | dd616d6a16288a0e8d79405650db2e68762a4367 (diff) | |
| download | rust-5f513a6a888b4d71d7949a7d6ff2688c86febd22.tar.gz rust-5f513a6a888b4d71d7949a7d6ff2688c86febd22.zip | |
run-make-support: improve docs for `assert_exit_code`
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/run-make-support/src/command.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/run-make-support/src/command.rs b/src/tools/run-make-support/src/command.rs index b4dc753ab53..70a72bd1abe 100644 --- a/src/tools/run-make-support/src/command.rs +++ b/src/tools/run-make-support/src/command.rs @@ -388,9 +388,13 @@ impl CompletedProcess { self } + /// Check the **exit status** of the process. On Unix, this is *not* the **wait status**. + /// + /// See [`std::process::ExitStatus::code`]. This is not to be confused with + /// [`std::process::ExitCode`]. #[track_caller] pub fn assert_exit_code(&self, code: i32) -> &Self { - assert!(self.output.status.code() == Some(code)); + assert_eq!(self.output.status.code(), Some(code)); self } } |
