1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Rename eframe::EframeError to eframe::Error

This commit is contained in:
Emil Ernerfeldt
2022-12-14 17:29:54 +01:00
parent 4e8341d35c
commit 37fd141dd1
18 changed files with 19 additions and 19 deletions

View File

@@ -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<T> = std::result::Result<T, EframeError>;
pub type Result<T> = std::result::Result<T, Error>;
// ---------------------------------------------------------------------------

View File

@@ -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));

View File

@@ -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());