File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -261,8 +261,12 @@ impl Config {
261
261
}
262
262
263
263
/// Check whether the host is the specified string
264
- pub fn host_matches ( & self , target : & str ) -> bool {
265
- self . host . as_ref ( ) . expect ( "host should have been filled in" ) == target
264
+ pub fn host_matches_target ( & self ) -> bool {
265
+ self . host . as_ref ( ) . expect ( "host should have been filled in" )
266
+ == self
267
+ . target
268
+ . as_ref ( )
269
+ . expect ( "target should have been filled in" )
266
270
}
267
271
268
272
pub ( crate ) fn has_asm_support ( & self ) -> bool {
@@ -283,7 +287,7 @@ impl Config {
283
287
Condition :: Bitwidth ( bits) => crate :: get_pointer_width ( target) == * bits,
284
288
Condition :: Target ( t) => target. contains ( t) ,
285
289
Condition :: Host ( t) => self . host . as_ref ( ) . unwrap ( ) . contains ( t) ,
286
- Condition :: OnHost => self . host_matches ( target ) ,
290
+ Condition :: OnHost => self . host_matches_target ( ) ,
287
291
}
288
292
}
289
293
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ impl TestConfig<'_> {
93
93
// Adding a `--target` arg to calls to Cargo will cause target folders
94
94
// to create a target-specific sub-folder. We can avoid that by just
95
95
// not passing a `--target` arg if its the same as the host.
96
- if !config. host_matches ( target ) {
96
+ if !config. host_matches_target ( ) {
97
97
cmd. arg ( "--target" ) . arg ( target) ;
98
98
}
99
99
}
You can’t perform that action at this time.
0 commit comments