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;
44use rustc_span:: { Span , Symbol } ;
55use std:: borrow:: Cow ;
66
7- struct ExitCode {
8- pub exit_code : Option < i32 > ,
9- }
7+ struct ExitCode ( Option < i32 > ) ;
108
119impl IntoDiagnosticArg for ExitCode {
1210 fn into_diagnostic_arg ( self ) -> DiagnosticArgValue < ' static > {
13- match self . exit_code {
11+ let ExitCode ( exit_code) = self ;
12+ match exit_code {
1413 Some ( t) => t. into_diagnostic_arg ( ) ,
1514 None => DiagnosticArgValue :: Str ( Cow :: Borrowed ( "None" ) ) ,
1615 }
@@ -25,8 +24,7 @@ pub(crate) struct RanlibFailure {
2524
2625impl RanlibFailure {
2726 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) }
3028 }
3129}
3230
You can’t perform that action at this time.
0 commit comments