@@ -1132,25 +1132,31 @@ impl Build {
1132
1132
} ) ;
1133
1133
1134
1134
if let Some ( atlmfc_lib) = atlmfc_lib {
1135
- self . print ( & format ! (
1135
+ self . print ( & format_args ! (
1136
1136
"cargo:rustc-link-search=native={}" ,
1137
1137
atlmfc_lib. display( )
1138
1138
) ) ;
1139
1139
}
1140
1140
}
1141
1141
1142
1142
if self . link_lib_modifiers . is_empty ( ) {
1143
- self . print ( & format ! ( "cargo:rustc-link-lib=static={}" , lib_name) ) ;
1143
+ self . print ( & format_args ! ( "cargo:rustc-link-lib=static={}" , lib_name) ) ;
1144
1144
} else {
1145
1145
let m = self . link_lib_modifiers . join ( "," ) ;
1146
- self . print ( & format ! ( "cargo:rustc-link-lib=static:{}={}" , m, lib_name) ) ;
1146
+ self . print ( & format_args ! (
1147
+ "cargo:rustc-link-lib=static:{}={}" ,
1148
+ m, lib_name
1149
+ ) ) ;
1147
1150
}
1148
- self . print ( & format ! ( "cargo:rustc-link-search=native={}" , dst. display( ) ) ) ;
1151
+ self . print ( & format_args ! (
1152
+ "cargo:rustc-link-search=native={}" ,
1153
+ dst. display( )
1154
+ ) ) ;
1149
1155
1150
1156
// Add specific C++ libraries, if enabled.
1151
1157
if self . cpp {
1152
1158
if let Some ( stdlib) = self . get_cpp_link_stdlib ( ) ? {
1153
- self . print ( & format ! ( "cargo:rustc-link-lib={}" , stdlib) ) ;
1159
+ self . print ( & format_args ! ( "cargo:rustc-link-lib={}" , stdlib) ) ;
1154
1160
}
1155
1161
}
1156
1162
@@ -2328,7 +2334,7 @@ impl Build {
2328
2334
ArchSpec :: Catalyst ( _) => "macosx" . to_owned ( ) ,
2329
2335
} ;
2330
2336
2331
- self . print ( & format ! ( "Detecting {} SDK path for {}" , os, sdk) ) ;
2337
+ self . print ( & format_args ! ( "Detecting {} SDK path for {}" , os, sdk) ) ;
2332
2338
let sdk_path = if let Some ( sdkroot) = env:: var_os ( "SDKROOT" ) {
2333
2339
sdkroot
2334
2340
} else {
@@ -3128,10 +3134,10 @@ impl Build {
3128
3134
return val. clone ( ) ;
3129
3135
}
3130
3136
if self . emit_rerun_if_env_changed && !provided_by_cargo ( v) {
3131
- self . print ( & format ! ( "cargo:rerun-if-env-changed={}" , v) ) ;
3137
+ self . print ( & format_args ! ( "cargo:rerun-if-env-changed={}" , v) ) ;
3132
3138
}
3133
3139
let r = env:: var ( v) . ok ( ) ;
3134
- self . print ( & format ! ( "{} = {:?}" , v, r) ) ;
3140
+ self . print ( & format_args ! ( "{} = {:?}" , v, r) ) ;
3135
3141
cache. insert ( v. to_string ( ) , r. clone ( ) ) ;
3136
3142
r
3137
3143
}
@@ -3174,7 +3180,7 @@ impl Build {
3174
3180
. collect ( ) )
3175
3181
}
3176
3182
3177
- fn print ( & self , s : & str ) {
3183
+ fn print ( & self , s : & dyn Display ) {
3178
3184
if self . cargo_metadata {
3179
3185
println ! ( "{}" , s) ;
3180
3186
}
0 commit comments