Skip to content

Commit c4dd80c

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 c4dd80c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
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

0 commit comments

Comments
 (0)