Suffix the drop-indicator stroke width to avoid the f32 fallback
egui's Stroke::new takes `width: impl Into<f32>`, so the unsuffixed 2.0 literal had no concrete type to infer from and relied on rustc falling back to f32. That fallback is being removed (rust#154024), and the float_literal_f32_fallback lint already warns it will become a hard error, so spell the type out as 2.0_f32. No behaviour change - the literal was already compiling as f32. The only other Stroke::new call site passes an f32 variable and was unaffected. cargo build is now warning-free; clippy is down to the four long-standing warnings in odt.rs and order.rs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBWj9TphFMCoh7VHaSRnvQ
This commit is contained in:
@@ -84,8 +84,12 @@ impl App {
|
|||||||
ui.painter().hline(
|
ui.painter().hline(
|
||||||
rect.x_range(),
|
rect.x_range(),
|
||||||
y,
|
y,
|
||||||
|
// `Stroke::new` takes `impl Into<f32>`, which
|
||||||
|
// gives an unsuffixed literal no concrete type
|
||||||
|
// to infer; suffix it rather than lean on the
|
||||||
|
// f32 fallback that rustc is removing.
|
||||||
egui::Stroke::new(
|
egui::Stroke::new(
|
||||||
2.0,
|
2.0_f32,
|
||||||
ui.visuals().selection.stroke.color,
|
ui.visuals().selection.stroke.color,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user