File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,12 @@ use rustc_middle::ty::Ty;
4
4
use rustc_span:: { Span , Symbol } ;
5
5
use std:: borrow:: Cow ;
6
6
7
- struct ExitCode {
8
- pub exit_code : Option < i32 > ,
9
- }
7
+ struct ExitCode ( Option < i32 > ) ;
10
8
11
9
impl IntoDiagnosticArg for ExitCode {
12
10
fn into_diagnostic_arg ( self ) -> DiagnosticArgValue < ' static > {
13
- match self . exit_code {
11
+ let ExitCode ( exit_code) = self ;
12
+ match exit_code {
14
13
Some ( t) => t. into_diagnostic_arg ( ) ,
15
14
None => DiagnosticArgValue :: Str ( Cow :: Borrowed ( "None" ) ) ,
16
15
}
@@ -25,8 +24,7 @@ pub(crate) struct RanlibFailure {
25
24
26
25
impl RanlibFailure {
27
26
pub fn new ( exit_code : Option < i32 > ) -> Self {
28
- let exit_code = ExitCode { exit_code } ;
29
- RanlibFailure { exit_code }
27
+ RanlibFailure { exit_code : ExitCode ( exit_code) }
30
28
}
31
29
}
32
30
You can’t perform that action at this time.
0 commit comments