Skip to content

Commit 098c62c

Browse files
committed
Simplify expansion for format_args!().
Instead of calling new(), we can just use a struct expression directly. Before: Placeholder::new(…, …, …, …) After: Placeholder { position: …, flags: …, width: …, precision: …, }
1 parent 089d160 commit 098c62c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

core/src/fmt/rt.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pub struct Placeholder {
2020
pub width: Count,
2121
}
2222

23+
#[cfg(bootstrap)]
2324
impl Placeholder {
24-
#[cfg(bootstrap)]
2525
#[inline]
2626
pub const fn new(
2727
position: usize,
@@ -33,12 +33,6 @@ impl Placeholder {
3333
) -> Self {
3434
Self { position, fill, align, flags, precision, width }
3535
}
36-
37-
#[cfg(not(bootstrap))]
38-
#[inline]
39-
pub const fn new(position: usize, flags: u32, precision: Count, width: Count) -> Self {
40-
Self { position, flags, precision, width }
41-
}
4236
}
4337

4438
#[cfg(bootstrap)]

0 commit comments

Comments
 (0)