diff --git a/crates/eframe/src/lib.rs b/crates/eframe/src/lib.rs index 28f2adb12..f0b6c69f5 100644 --- a/crates/eframe/src/lib.rs +++ b/crates/eframe/src/lib.rs @@ -211,7 +211,7 @@ pub fn run_native( /// The different problems that can occur when trying to run `eframe`. #[derive(thiserror::Error, Debug)] -pub enum EframeError { +pub enum Error { #[cfg(not(target_arch = "wasm32"))] #[error("winit error: {0}")] Winit(#[from] winit::error::OsError), @@ -229,7 +229,7 @@ pub enum EframeError { Wgpu(#[from] wgpu::RequestDeviceError), } -pub type Result = std::result::Result; +pub type Result = std::result::Result; // --------------------------------------------------------------------------- diff --git a/crates/eframe/src/native/run.rs b/crates/eframe/src/native/run.rs index 6adf72943..d4eee2f5b 100644 --- a/crates/eframe/src/native/run.rs +++ b/crates/eframe/src/native/run.rs @@ -424,7 +424,7 @@ mod glow_integration { let config = gl_display .find_configs(config_template.clone())? .next() - .ok_or(crate::EframeError::NoGlutinConfigs(config_template))?; + .ok_or(crate::Error::NoGlutinConfigs(config_template))?; let context_attributes = glutin::context::ContextAttributesBuilder::new().build(Some(raw_window_handle)); diff --git a/crates/egui_demo_app/src/main.rs b/crates/egui_demo_app/src/main.rs index d57e9d64a..d87b10cfb 100644 --- a/crates/egui_demo_app/src/main.rs +++ b/crates/egui_demo_app/src/main.rs @@ -3,7 +3,7 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release // When compiling natively: -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { { // Silence wgpu log spam (https://github.com/gfx-rs/wgpu/issues/3206) let mut rust_log = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_owned()); diff --git a/examples/confirm_exit/src/main.rs b/examples/confirm_exit/src/main.rs index 167d4cbc6..eeb25d8db 100644 --- a/examples/confirm_exit/src/main.rs +++ b/examples/confirm_exit/src/main.rs @@ -2,7 +2,7 @@ use eframe::egui; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { initial_window_size: Some(egui::vec2(320.0, 240.0)), ..Default::default() diff --git a/examples/custom_3d_glow/src/main.rs b/examples/custom_3d_glow/src/main.rs index 79cf16229..f214f4b90 100644 --- a/examples/custom_3d_glow/src/main.rs +++ b/examples/custom_3d_glow/src/main.rs @@ -6,7 +6,7 @@ use eframe::egui; use egui::mutex::Mutex; use std::sync::Arc; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { initial_window_size: Some(egui::vec2(350.0, 380.0)), multisampling: 8, diff --git a/examples/custom_3d_three-d/src/main.rs b/examples/custom_3d_three-d/src/main.rs index d9381cdbd..e1a5b9423 100644 --- a/examples/custom_3d_three-d/src/main.rs +++ b/examples/custom_3d_three-d/src/main.rs @@ -4,7 +4,7 @@ use eframe::egui; #[cfg(not(target_arch = "wasm32"))] -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { initial_window_size: Some(egui::vec2(550.0, 610.0)), multisampling: 8, diff --git a/examples/custom_font/src/main.rs b/examples/custom_font/src/main.rs index 3f65b422c..409230dda 100644 --- a/examples/custom_font/src/main.rs +++ b/examples/custom_font/src/main.rs @@ -2,7 +2,7 @@ use eframe::egui; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { initial_window_size: Some(egui::vec2(320.0, 240.0)), ..Default::default() diff --git a/examples/custom_font_style/src/main.rs b/examples/custom_font_style/src/main.rs index c6c57d10f..b0bb559de 100644 --- a/examples/custom_font_style/src/main.rs +++ b/examples/custom_font_style/src/main.rs @@ -58,7 +58,7 @@ impl eframe::App for MyApp { } } -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions::default(); eframe::run_native( diff --git a/examples/custom_window_frame/src/main.rs b/examples/custom_window_frame/src/main.rs index b41dae7aa..e4110d01c 100644 --- a/examples/custom_window_frame/src/main.rs +++ b/examples/custom_window_frame/src/main.rs @@ -4,7 +4,7 @@ use eframe::egui; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { // Hide the OS-specific "chrome" around the window: decorated: false, diff --git a/examples/download_image/src/main.rs b/examples/download_image/src/main.rs index 4eaf6e959..e031cf3de 100644 --- a/examples/download_image/src/main.rs +++ b/examples/download_image/src/main.rs @@ -4,7 +4,7 @@ use eframe::egui; use egui_extras::RetainedImage; use poll_promise::Promise; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions::default(); eframe::run_native( "Download and show an image with eframe/egui", diff --git a/examples/file_dialog/src/main.rs b/examples/file_dialog/src/main.rs index e26d9861a..062e0752e 100644 --- a/examples/file_dialog/src/main.rs +++ b/examples/file_dialog/src/main.rs @@ -2,7 +2,7 @@ use eframe::egui; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { drag_and_drop_support: true, initial_window_size: Some(egui::vec2(320.0, 240.0)), diff --git a/examples/hello_world/src/main.rs b/examples/hello_world/src/main.rs index dcef5edf0..6b0f2f0dc 100644 --- a/examples/hello_world/src/main.rs +++ b/examples/hello_world/src/main.rs @@ -2,7 +2,7 @@ use eframe::egui; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { // Log to stdout (if you run with `RUST_LOG=debug`). tracing_subscriber::fmt::init(); diff --git a/examples/keyboard_events/src/main.rs b/examples/keyboard_events/src/main.rs index 1045fc050..456355e72 100644 --- a/examples/keyboard_events/src/main.rs +++ b/examples/keyboard_events/src/main.rs @@ -2,7 +2,7 @@ use eframe::egui; use egui::*; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { // Log to stdout (if you run with `RUST_LOG=debug`). tracing_subscriber::fmt::init(); diff --git a/examples/puffin_profiler/src/main.rs b/examples/puffin_profiler/src/main.rs index 1bc6b2f96..e07da2b8c 100644 --- a/examples/puffin_profiler/src/main.rs +++ b/examples/puffin_profiler/src/main.rs @@ -2,7 +2,7 @@ use eframe::egui; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { start_puffin_server(); // NOTE: you may only want to call this if the users specifies some flag or clicks a button! let options = eframe::NativeOptions::default(); diff --git a/examples/retained_image/src/main.rs b/examples/retained_image/src/main.rs index 790d842cf..4ccce7a70 100644 --- a/examples/retained_image/src/main.rs +++ b/examples/retained_image/src/main.rs @@ -3,7 +3,7 @@ use eframe::egui; use egui_extras::RetainedImage; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { initial_window_size: Some(egui::vec2(300.0, 900.0)), ..Default::default() diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs index 4ee427b21..40930e79b 100644 --- a/examples/screenshot/src/main.rs +++ b/examples/screenshot/src/main.rs @@ -6,7 +6,7 @@ use eframe::{ }; use itertools::Itertools as _; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions::default(); eframe::run_native( "Take screenshots and display with eframe/egui", diff --git a/examples/serial_windows/src/main.rs b/examples/serial_windows/src/main.rs index 5e223d182..b7dc7944a 100644 --- a/examples/serial_windows/src/main.rs +++ b/examples/serial_windows/src/main.rs @@ -2,7 +2,7 @@ use eframe::egui; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { if cfg!(target_os = "macos") { eprintln!("WARNING: this example does not work on Mac! See https://github.com/emilk/egui/issues/1918"); } diff --git a/examples/svg/src/main.rs b/examples/svg/src/main.rs index 7640f2cce..526a68cfa 100644 --- a/examples/svg/src/main.rs +++ b/examples/svg/src/main.rs @@ -6,7 +6,7 @@ use eframe::egui; -fn main() -> Result<(), eframe::EframeError> { +fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { initial_window_size: Some(egui::vec2(1000.0, 700.0)), ..Default::default()