mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Auto merge of #114428 - ChaiTRex:master, r=dtolnay
Convert `Into<ExitStatus> for ExitStatusError` to `From<ExitStatusError> for ExitStatus` in `std::process` Implementing suggestion from https://github.com/rust-lang/rust/issues/84908#issuecomment-912352902: > I believe the impl on ExitStatusError should be > > ```rust > impl From<ExitStatusError> for ExitStatus > ``` > > rather than > > ```rust > impl Into<ExitStatus> for ExitStatusError > ``` > > (there is generally never anything implemented as `Into` first, because implementing `From` reflexively provides `Into`)
This commit is contained in:
commit
c01d8d238c
@ -1807,9 +1807,9 @@ impl ExitStatusError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[unstable(feature = "exit_status_error", issue = "84908")]
|
#[unstable(feature = "exit_status_error", issue = "84908")]
|
||||||
impl Into<ExitStatus> for ExitStatusError {
|
impl From<ExitStatusError> for ExitStatus {
|
||||||
fn into(self) -> ExitStatus {
|
fn from(error: ExitStatusError) -> Self {
|
||||||
ExitStatus(self.0.into())
|
Self(error.0.into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user