mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Use Rust edition 2024 (#7280)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use egui::accesskit::ActionRequest;
|
||||
use egui::mutex::Mutex;
|
||||
use egui::{accesskit, Modifiers, PointerButton, Pos2};
|
||||
use kittest::{debug_fmt_node, AccessKitNode, NodeT};
|
||||
use egui::{Modifiers, PointerButton, Pos2, accesskit};
|
||||
use kittest::{AccessKitNode, NodeT, debug_fmt_node};
|
||||
use std::fmt::{Debug, Formatter};
|
||||
|
||||
pub(crate) enum EventType {
|
||||
|
||||
@@ -128,11 +128,17 @@ impl Display for SnapshotError {
|
||||
write!(f, "Missing snapshot: {path:?}. {HOW_TO_UPDATE_SCREENSHOTS}")
|
||||
}
|
||||
err => {
|
||||
write!(f, "Error reading snapshot: {err:?}\nAt: {path:?}. {HOW_TO_UPDATE_SCREENSHOTS}")
|
||||
write!(
|
||||
f,
|
||||
"Error reading snapshot: {err:?}\nAt: {path:?}. {HOW_TO_UPDATE_SCREENSHOTS}"
|
||||
)
|
||||
}
|
||||
},
|
||||
err => {
|
||||
write!(f, "Error decoding snapshot: {err:?}\nAt: {path:?}. Make sure git-lfs is setup correctly. Read the instructions here: https://github.com/emilk/egui/blob/main/CONTRIBUTING.md#making-a-pr")
|
||||
write!(
|
||||
f,
|
||||
"Error decoding snapshot: {err:?}\nAt: {path:?}. Make sure git-lfs is setup correctly. Read the instructions here: https://github.com/emilk/egui/blob/main/CONTRIBUTING.md#making-a-pr"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -555,11 +561,7 @@ impl SnapshotResults {
|
||||
/// Convert this into a `Result<(), Self>`.
|
||||
#[expect(clippy::missing_errors_doc)]
|
||||
pub fn into_result(self) -> Result<(), Self> {
|
||||
if self.has_errors() {
|
||||
Err(self)
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
if self.has_errors() { Err(self) } else { Ok(()) }
|
||||
}
|
||||
|
||||
pub fn into_inner(mut self) -> Vec<SnapshotError> {
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::iter::once;
|
||||
use std::sync::Arc;
|
||||
|
||||
use egui::TexturesDelta;
|
||||
use egui_wgpu::{wgpu, RenderState, ScreenDescriptor, WgpuSetup};
|
||||
use egui_wgpu::{RenderState, ScreenDescriptor, WgpuSetup, wgpu};
|
||||
use image::RgbaImage;
|
||||
|
||||
use crate::texture_to_image::texture_to_image;
|
||||
|
||||
Reference in New Issue
Block a user