Skip to content

Commit 461497f

Browse files
committed
Fix a few uninlined_format_args lints (#7368)
# Objective Prevent things from breaking tomorrow when rust 1.67 is released. ## Solution Fix a few `uninlined_format_args` lints in recently introduced code.
1 parent 6b38863 commit 461497f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

crates/bevy_pbr/src/light.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,11 @@ impl CascadeShadowConfig {
280280
) -> Self {
281281
assert!(
282282
num_cascades > 0,
283-
"num_cascades must be positive, but was {}",
284-
num_cascades
283+
"num_cascades must be positive, but was {num_cascades}",
285284
);
286285
assert!(
287286
(0.0..1.0).contains(&overlap_proportion),
288-
"overlap_proportion must be in [0.0, 1.0) but was {}",
289-
overlap_proportion
287+
"overlap_proportion must be in [0.0, 1.0) but was {overlap_proportion}",
290288
);
291289
Self {
292290
bounds: calculate_cascade_bounds(num_cascades, nearest_bound, shadow_maximum_distance),
@@ -397,8 +395,8 @@ fn calculate_cascade(
397395
z_near: f32,
398396
z_far: f32,
399397
) -> Cascade {
400-
debug_assert!(z_near <= 0.0, "z_near {} must be <= 0.0", z_near);
401-
debug_assert!(z_far <= 0.0, "z_far {} must be <= 0.0", z_far);
398+
debug_assert!(z_near <= 0.0, "z_near {z_near} must be <= 0.0");
399+
debug_assert!(z_far <= 0.0, "z_far {z_far} must be <= 0.0");
402400
// NOTE: This whole function is very sensitive to floating point precision and instability and
403401
// has followed instructions to avoid view dependence from the section on cascade shadow maps in
404402
// Eric Lengyel's Foundations of Game Engine Development 2: Rendering. Be very careful when

examples/shader/texture_binding_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn setup(
5555
let textures: Vec<_> = TILE_ID
5656
.iter()
5757
.map(|id| {
58-
let path = format!("textures/rpg/tiles/generic-rpg-tile{:0>2}.png", id);
58+
let path = format!("textures/rpg/tiles/generic-rpg-tile{id:0>2}.png");
5959
asset_server.load(path)
6060
})
6161
.collect();

0 commit comments

Comments
 (0)