Skip to content

Commit c01d8d2

Browse files
committed
Auto merge of rust-lang#114428 - ChaiTRex:master, r=dtolnay
Convert `Into<ExitStatus> for ExitStatusError` to `From<ExitStatusError> for ExitStatus` in `std::process` Implementing suggestion from rust-lang#84908 (comment): > 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`)
2 parents e2d6aa7 + 6acb415 commit c01d8d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/std/src/process.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1807,9 +1807,9 @@ impl ExitStatusError {
18071807
}
18081808

18091809
#[unstable(feature = "exit_status_error", issue = "84908")]
1810-
impl Into<ExitStatus> for ExitStatusError {
1811-
fn into(self) -> ExitStatus {
1812-
ExitStatus(self.0.into())
1810+
impl From<ExitStatusError> for ExitStatus {
1811+
fn from(error: ExitStatusError) -> Self {
1812+
Self(error.0.into())
18131813
}
18141814
}
18151815

0 commit comments

Comments
 (0)