Skip to content

Commit 0b61199

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

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/build-rs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "build-rs"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
rust-version.workspace = true
55
edition.workspace = true
66
license.workspace = true

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)