Rename eframe::EframeError to eframe::Error
This commit is contained in:
parent
4e8341d35c
commit
37fd141dd1
18 changed files with 19 additions and 19 deletions
|
@ -211,7 +211,7 @@ pub fn run_native(
|
||||||
|
|
||||||
/// The different problems that can occur when trying to run `eframe`.
|
/// The different problems that can occur when trying to run `eframe`.
|
||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
pub enum EframeError {
|
pub enum Error {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
#[error("winit error: {0}")]
|
#[error("winit error: {0}")]
|
||||||
Winit(#[from] winit::error::OsError),
|
Winit(#[from] winit::error::OsError),
|
||||||
|
@ -229,7 +229,7 @@ pub enum EframeError {
|
||||||
Wgpu(#[from] wgpu::RequestDeviceError),
|
Wgpu(#[from] wgpu::RequestDeviceError),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Result<T> = std::result::Result<T, EframeError>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -424,7 +424,7 @@ mod glow_integration {
|
||||||
let config = gl_display
|
let config = gl_display
|
||||||
.find_configs(config_template.clone())?
|
.find_configs(config_template.clone())?
|
||||||
.next()
|
.next()
|
||||||
.ok_or(crate::EframeError::NoGlutinConfigs(config_template))?;
|
.ok_or(crate::Error::NoGlutinConfigs(config_template))?;
|
||||||
|
|
||||||
let context_attributes =
|
let context_attributes =
|
||||||
glutin::context::ContextAttributesBuilder::new().build(Some(raw_window_handle));
|
glutin::context::ContextAttributesBuilder::new().build(Some(raw_window_handle));
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||||
|
|
||||||
// When compiling natively:
|
// 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)
|
// 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());
|
let mut rust_log = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_owned());
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
initial_window_size: Some(egui::vec2(320.0, 240.0)),
|
initial_window_size: Some(egui::vec2(320.0, 240.0)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
|
@ -6,7 +6,7 @@ use eframe::egui;
|
||||||
use egui::mutex::Mutex;
|
use egui::mutex::Mutex;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
initial_window_size: Some(egui::vec2(350.0, 380.0)),
|
initial_window_size: Some(egui::vec2(350.0, 380.0)),
|
||||||
multisampling: 8,
|
multisampling: 8,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
initial_window_size: Some(egui::vec2(550.0, 610.0)),
|
initial_window_size: Some(egui::vec2(550.0, 610.0)),
|
||||||
multisampling: 8,
|
multisampling: 8,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
initial_window_size: Some(egui::vec2(320.0, 240.0)),
|
initial_window_size: Some(egui::vec2(320.0, 240.0)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
|
@ -58,7 +58,7 @@ impl eframe::App for MyApp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions::default();
|
let options = eframe::NativeOptions::default();
|
||||||
|
|
||||||
eframe::run_native(
|
eframe::run_native(
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
// Hide the OS-specific "chrome" around the window:
|
// Hide the OS-specific "chrome" around the window:
|
||||||
decorated: false,
|
decorated: false,
|
||||||
|
|
|
@ -4,7 +4,7 @@ use eframe::egui;
|
||||||
use egui_extras::RetainedImage;
|
use egui_extras::RetainedImage;
|
||||||
use poll_promise::Promise;
|
use poll_promise::Promise;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions::default();
|
let options = eframe::NativeOptions::default();
|
||||||
eframe::run_native(
|
eframe::run_native(
|
||||||
"Download and show an image with eframe/egui",
|
"Download and show an image with eframe/egui",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
drag_and_drop_support: true,
|
drag_and_drop_support: true,
|
||||||
initial_window_size: Some(egui::vec2(320.0, 240.0)),
|
initial_window_size: Some(egui::vec2(320.0, 240.0)),
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
// Log to stdout (if you run with `RUST_LOG=debug`).
|
// Log to stdout (if you run with `RUST_LOG=debug`).
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
use egui::*;
|
use egui::*;
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
// Log to stdout (if you run with `RUST_LOG=debug`).
|
// Log to stdout (if you run with `RUST_LOG=debug`).
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
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!
|
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();
|
let options = eframe::NativeOptions::default();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
use egui_extras::RetainedImage;
|
use egui_extras::RetainedImage;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
initial_window_size: Some(egui::vec2(300.0, 900.0)),
|
initial_window_size: Some(egui::vec2(300.0, 900.0)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
|
@ -6,7 +6,7 @@ use eframe::{
|
||||||
};
|
};
|
||||||
use itertools::Itertools as _;
|
use itertools::Itertools as _;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions::default();
|
let options = eframe::NativeOptions::default();
|
||||||
eframe::run_native(
|
eframe::run_native(
|
||||||
"Take screenshots and display with eframe/egui",
|
"Take screenshots and display with eframe/egui",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
if cfg!(target_os = "macos") {
|
if cfg!(target_os = "macos") {
|
||||||
eprintln!("WARNING: this example does not work on Mac! See https://github.com/emilk/egui/issues/1918");
|
eprintln!("WARNING: this example does not work on Mac! See https://github.com/emilk/egui/issues/1918");
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::EframeError> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
initial_window_size: Some(egui::vec2(1000.0, 700.0)),
|
initial_window_size: Some(egui::vec2(1000.0, 700.0)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
Loading…
Reference in a new issue