1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 14:49:06 -04:00

perf: remove redundant clone in about.rs demo (#8057)

As shown in the commit, this is exactly what it contains. There was a
redundant and seemingly meaningless `.clone()` in `about.rs`, which I
removed. Was it because the function signature of `Image::new()` was
different in older versions of egui?

Co-authored-by: EtherealPsyche <EtherealPsyche@users.noreply.github.com>
This commit is contained in:
psyche
2026-04-04 18:28:06 +08:00
committed by GitHub
parent 0435d2a9a1
commit 8ada641ee2

View File

@@ -29,9 +29,8 @@ impl crate::View for About {
ui.vertical_centered(|ui| {
ui.add_space(4.0);
let egui_icon = egui::include_image!("../../data/egui-logo.svg");
ui.add(
egui::Image::new(egui_icon.clone())
egui::Image::new(egui::include_image!("../../data/egui-logo.svg"))
.max_height(30.0)
.tint(ui.visuals().strong_text_color()),
);