Lints: keep the sizing story closures

This commit is contained in:
aiongg
2026-11-14 00:39:29 +00:00
parent d325856d4f
commit 469e3cbc62
@@ -9,12 +9,14 @@ use egui::Ui;
const PICTURE: PixelSize = PixelSize::new(1600, 900);
#[story(ImageSize<'static>, covers = [], drive = Drive::Never)]
#[expect(clippy::redundant_closure, reason = "`ImageSize::new` as a function item is not general over the borrow the host passes")]
fn image_size(ui: &mut Ui, data: &mut StoryData) -> StoryOutput {
let resample = *data.value("resample", true);
hosted(ui, data, resample, || HostedImageSize::new(ImageSizeValues::new(PICTURE).resampling(resample), ImageSize::new))
hosted(ui, data, resample, || HostedImageSize::new(ImageSizeValues::new(PICTURE).resampling(resample), |values| ImageSize::new(values)))
}
#[story(CanvasSize<'static>, covers = [], drive = Drive::Never)]
#[expect(clippy::redundant_closure, reason = "`CanvasSize::new` as a function item is not general over the borrow the host passes")]
fn canvas_size(ui: &mut Ui, data: &mut StoryData) -> StoryOutput {
hosted(ui, data, (), || HostedCanvasSize::new(CanvasSizeValues::new(PICTURE), CanvasSize::new))
hosted(ui, data, (), || HostedCanvasSize::new(CanvasSizeValues::new(PICTURE), |values| CanvasSize::new(values)))
}