Skip to content

Commit fd7736a

Browse files
committed
style: Use inlined format args
1 parent e5987ea commit fd7736a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/build-rs/src/output.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::{fmt::Display, fmt::Write as _};
1313
use crate::ident::{is_ascii_ident, is_ident};
1414

1515
fn emit(directive: &str, value: impl Display) {
16-
println!("cargo::{}={}", directive, value);
16+
println!("cargo::{directive}={value}");
1717
}
1818

1919
/// The `rerun-if-changed` instruction tells Cargo to re-run the build script if the
@@ -97,7 +97,7 @@ pub fn rustc_link_arg_bin(bin: &str, flag: &str) {
9797
if flag.contains([' ', '\n']) {
9898
panic!("cannot emit rustc-link-arg-bin: invalid flag {flag:?}");
9999
}
100-
emit("rustc-link-arg-bin", format_args!("{}={}", bin, flag));
100+
emit("rustc-link-arg-bin", format_args!("{bin}={flag}"));
101101
}
102102

103103
/// The `rustc-link-arg-bins` instruction tells Cargo to pass the
@@ -433,5 +433,5 @@ pub fn metadata(key: &str, val: &str) {
433433
panic!("cannot emit metadata: invalid value {val:?}");
434434
}
435435

436-
emit("metadata", format_args!("{}={}", key, val));
436+
emit("metadata", format_args!("{key}={val}"));
437437
}

0 commit comments

Comments
 (0)