Skip to content

Commit

Permalink
Remove unnecessary std::result:: Prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 11, 2023
1 parent 922c372 commit 51938ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/eframe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ pub enum Error {
}

/// Short for `Result<T, eframe::Error>`.
pub type Result<T> = std::result::Result<T, Error>;
pub type Result<T, E = Error> = std::result::Result<T, E>;

// ---------------------------------------------------------------------------

Expand Down
9 changes: 4 additions & 5 deletions crates/eframe/src/native/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1927,8 +1927,7 @@ mod wgpu_integration {
storage: Option<&dyn epi::Storage>,
title: &str,
native_options: &mut NativeOptions,
) -> std::result::Result<(winit::window::Window, ViewportBuilder), winit::error::OsError>
{
) -> Result<(winit::window::Window, ViewportBuilder), winit::error::OsError> {
crate::profile_function!();

let window_settings = epi_integration::load_window_settings(storage);
Expand Down Expand Up @@ -2004,7 +2003,7 @@ mod wgpu_integration {
}
}

fn set_window(&mut self, id: ViewportId) -> std::result::Result<(), egui_wgpu::WgpuError> {
fn set_window(&mut self, id: ViewportId) -> Result<(), egui_wgpu::WgpuError> {
if let Some(running) = &mut self.running {
crate::profile_function!();
let mut shared = running.shared.borrow_mut();
Expand All @@ -2023,7 +2022,7 @@ mod wgpu_integration {
}

#[cfg(target_os = "android")]
fn drop_window(&mut self) -> std::result::Result<(), egui_wgpu::WgpuError> {
fn drop_window(&mut self) -> Result<(), egui_wgpu::WgpuError> {
if let Some(running) = &mut self.running {
let mut shared = running.shared.borrow_mut();
shared.viewports.remove(&ViewportId::ROOT);
Expand All @@ -2038,7 +2037,7 @@ mod wgpu_integration {
storage: Option<Box<dyn epi::Storage>>,
window: winit::window::Window,
builder: ViewportBuilder,
) -> std::result::Result<(), egui_wgpu::WgpuError> {
) -> Result<(), egui_wgpu::WgpuError> {
crate::profile_function!();

#[allow(unsafe_code, unused_mut, unused_unsafe)]
Expand Down

0 comments on commit 51938ef

Please sign in to comment.