@@ -152,38 +152,42 @@ impl DebugOptions {
152
152
None => ( setting_str, None ) ,
153
153
Some ( ( k, v) ) => ( k, Some ( v) ) ,
154
154
} ;
155
- if option == "allow_unused_expressions" {
156
- allow_unused_expressions = bool_option_val ( option, value) ;
157
- debug ! (
158
- "{} env option `allow_unused_expressions` is set to {}" ,
159
- RUSTC_COVERAGE_DEBUG_OPTIONS , allow_unused_expressions
160
- ) ;
161
- } else if option == "counter_format" {
162
- match value {
163
- None => {
164
- bug ! (
165
- "`{}` option in environment variable {} requires one or more \
166
- plus-separated choices (a non-empty subset of \
167
- `id+block+operation`)",
168
- option,
169
- RUSTC_COVERAGE_DEBUG_OPTIONS
170
- ) ;
171
- }
172
- Some ( val) => {
173
- counter_format = counter_format_option_val ( val) ;
174
- debug ! (
175
- "{} env option `counter_format` is set to {:?}" ,
176
- RUSTC_COVERAGE_DEBUG_OPTIONS , counter_format
177
- ) ;
178
- }
179
- } ;
180
- } else {
181
- bug ! (
182
- "Unsupported setting `{}` in environment variable {}" ,
183
- option,
184
- RUSTC_COVERAGE_DEBUG_OPTIONS
185
- )
186
- }
155
+ match option {
156
+ "allow_unused_expressions" => {
157
+ allow_unused_expressions = bool_option_val ( option, value) ;
158
+ debug ! (
159
+ "{} env option `allow_unused_expressions` is set to {}" ,
160
+ RUSTC_COVERAGE_DEBUG_OPTIONS , allow_unused_expressions
161
+ ) ;
162
+ }
163
+ "counter_format" => {
164
+ match value {
165
+ None => {
166
+ bug ! (
167
+ "`{}` option in environment variable {} requires one or more \
168
+ plus-separated choices (a non-empty subset of \
169
+ `id+block+operation`)",
170
+ option,
171
+ RUSTC_COVERAGE_DEBUG_OPTIONS
172
+ ) ;
173
+ }
174
+ Some ( val) => {
175
+ counter_format = counter_format_option_val ( val) ;
176
+ debug ! (
177
+ "{} env option `counter_format` is set to {:?}" ,
178
+ RUSTC_COVERAGE_DEBUG_OPTIONS , counter_format
179
+ ) ;
180
+ }
181
+ } ;
182
+ }
183
+ _ => {
184
+ bug ! (
185
+ "Unsupported setting `{}` in environment variable {}" ,
186
+ option,
187
+ RUSTC_COVERAGE_DEBUG_OPTIONS
188
+ )
189
+ }
190
+ } ;
187
191
}
188
192
}
189
193
0 commit comments