Skip to content

Commit

Permalink
Use the short eframe::Result in all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jun 25, 2024
1 parent b71625b commit 7bd0a4f
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion crates/egui_demo_app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#![allow(clippy::never_loop)] // False positive

// When compiling natively:
fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
for arg in std::env::args().skip(1) {
match arg.as_str() {
"--profile" => {
Expand Down
2 changes: 1 addition & 1 deletion examples/confirm_exit/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]),
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_3d_glow/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use eframe::{egui, egui_glow, glow};
use egui::mutex::Mutex;
use std::sync::Arc;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([350.0, 380.0]),
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_font/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]),
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_font_style/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use eframe::egui;
use egui::{FontFamily, FontId, RichText, TextStyle};

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions::default();

Expand Down
2 changes: 1 addition & 1 deletion examples/custom_keypad/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use eframe::egui;
mod keypad;
use keypad::Keypad;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([640.0, 480.0]),
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_plot_manipulation/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use eframe::egui::{self, DragValue, Event, Vec2};
use egui_plot::{Legend, Line, PlotPoints};

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions::default();
eframe::run_native(
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_window_frame/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use eframe::egui::{self, ViewportCommand};

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default()
Expand Down
2 changes: 1 addition & 1 deletion examples/file_dialog/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default()
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]),
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world_par/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::thread::JoinHandle;

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([1024.0, 768.0]),
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world_simple/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).

let options = eframe::NativeOptions {
Expand Down
2 changes: 1 addition & 1 deletion examples/images/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([600.0, 800.0]),
Expand Down
2 changes: 1 addition & 1 deletion examples/keyboard_events/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use eframe::egui;
use egui::*;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions::default();
eframe::run_native(
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_viewports/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::sync::{

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]),
Expand Down
2 changes: 1 addition & 1 deletion examples/puffin_profiler/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::sync::{

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
start_puffin_server(); // NOTE: you may only want to call this if the users specifies some flag or clicks a button!

Expand Down
2 changes: 1 addition & 1 deletion examples/save_plot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use eframe::egui;
use egui_plot::{Legend, Line, Plot, PlotPoints};

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).

let options = eframe::NativeOptions {
Expand Down
2 changes: 1 addition & 1 deletion examples/screenshot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::Arc;

use eframe::egui::{self, ColorImage};

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
renderer: eframe::Renderer::Wgpu,
Expand Down
2 changes: 1 addition & 1 deletion examples/serial_windows/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).

if cfg!(target_os = "macos") {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ui_stack/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use eframe::egui;
use eframe::egui::{Rangef, Shape, UiKind};
use egui_extras::Column;

fn main() -> Result<(), eframe::Error> {
fn main() -> eframe::Result {
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]),
Expand Down

0 comments on commit 7bd0a4f

Please sign in to comment.