File tree 3 files changed +4
-19
lines changed
3 files changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ impl Cli {
34
34
command. arg ( "--features" ) ;
35
35
if !self . feature . is_empty ( ) {
36
36
command. args ( [ self . feature . join ( "," ) ] ) ;
37
- } else if platform :: windows ( ) {
37
+ } else if cfg ! ( windows ) {
38
38
command. arg ( "default-msvc" ) ;
39
39
} else {
40
40
command. arg ( "default" ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ use clap::Args;
3
3
use std:: collections:: BTreeMap ;
4
4
5
5
use crate :: app;
6
- use crate :: platform;
7
6
use crate :: testing:: { config:: RustToolchainConfig , runner:: * } ;
8
7
9
8
/// Execute tests
@@ -43,7 +42,7 @@ impl Cli {
43
42
args. extend ( extra_args. to_owned ( ) ) ;
44
43
45
44
if !( self . container || extra_args. contains ( & "--features" . to_string ( ) ) ) {
46
- if platform :: windows ( ) {
45
+ if cfg ! ( windows ) {
47
46
args. extend ( [ "--features" . to_string ( ) , "default-msvc" . to_string ( ) ] ) ;
48
47
} else {
49
48
args. extend ( [ "--features" . to_string ( ) , "default" . to_string ( ) ] ) ;
Original file line number Diff line number Diff line change @@ -27,29 +27,15 @@ pub fn data_dir() -> PathBuf {
27
27
}
28
28
29
29
pub fn default_target ( ) -> String {
30
- if windows ( ) {
30
+ if cfg ! ( windows ) {
31
31
format ! ( "{}-pc-windows-msvc" , ARCH )
32
- } else if macos ( ) {
32
+ } else if cfg ! ( macos ) {
33
33
format ! ( "{}-apple-darwin" , ARCH )
34
34
} else {
35
35
format ! ( "{}-unknown-linux-gnu" , ARCH )
36
36
}
37
37
}
38
38
39
- pub const fn windows ( ) -> bool {
40
- cfg ! ( windows)
41
- }
42
-
43
- #[ allow( dead_code) ]
44
- pub const fn macos ( ) -> bool {
45
- cfg ! ( target_os = "macos" )
46
- }
47
-
48
- #[ allow( dead_code) ]
49
- pub const fn unix ( ) -> bool {
50
- cfg ! ( not( any( windows, target_os = "macos" ) ) )
51
- }
52
-
53
39
#[ once]
54
40
fn _project_dirs ( ) -> Option < ProjectDirs > {
55
41
ProjectDirs :: from ( "" , "vector" , "vdev" )
You can’t perform that action at this time.
0 commit comments