Make Application and Sandbox return a Result

This commit is contained in:
Héctor Ramón Jiménez 2020-09-08 00:35:17 +02:00
parent faa12382d4
commit c1f79b40cf
40 changed files with 166 additions and 58 deletions

View file

@ -3,11 +3,11 @@ use iced::{
button, Align, Button, Column, Element, Length, Sandbox, Settings, Text,
};
pub fn main() {
pub fn main() -> iced::Result {
Example::run(Settings {
antialiasing: true,
..Settings::default()
});
})
}
#[derive(Default)]

View file

@ -4,7 +4,7 @@ use iced::{
Point, Rectangle, Settings, Subscription, Vector,
};
pub fn main() {
pub fn main() -> iced::Result {
Clock::run(Settings {
antialiasing: true,
..Settings::default()

View file

@ -8,7 +8,7 @@ use palette::{self, Hsl, Limited, Srgb};
use std::marker::PhantomData;
use std::ops::RangeInclusive;
pub fn main() {
pub fn main() -> iced::Result {
ColorPalette::run(Settings {
antialiasing: true,
..Settings::default()

View file

@ -1,6 +1,6 @@
use iced::{button, Align, Button, Column, Element, Sandbox, Settings, Text};
pub fn main() {
pub fn main() -> iced::Result {
Counter::run(Settings::default())
}

View file

@ -90,7 +90,7 @@ use iced::{
Slider, Text,
};
pub fn main() {
pub fn main() -> iced::Result {
Example::run(Settings::default())
}

View file

@ -5,7 +5,7 @@ use iced::{
mod download;
pub fn main() {
pub fn main() -> iced::Result {
Example::run(Settings::default())
}

View file

@ -3,7 +3,7 @@ use iced::{
Element, Length, Settings, Subscription, Text,
};
pub fn main() {
pub fn main() -> iced::Result {
Events::run(Settings::default())
}

View file

@ -16,7 +16,7 @@ use iced::{
use preset::Preset;
use std::time::{Duration, Instant};
pub fn main() {
pub fn main() -> iced::Result {
GameOfLife::run(Settings {
antialiasing: true,
..Settings::default()

View file

@ -165,7 +165,7 @@ use iced::{
};
use rainbow::Rainbow;
pub fn main() {
pub fn main() -> iced::Result {
Example::run(Settings::default())
}

View file

@ -4,7 +4,7 @@ use iced::{
Settings, Text,
};
pub fn main() {
pub fn main() -> iced::Result {
Example::run(Settings::default())
}

View file

@ -3,7 +3,7 @@ use iced::{
Sandbox, Scrollable, Settings, Space, Text,
};
pub fn main() {
pub fn main() -> iced::Result {
Example::run(Settings::default())
}

View file

@ -3,7 +3,7 @@ use iced::{
Container, Element, Image, Length, Row, Settings, Text,
};
pub fn main() {
pub fn main() -> iced::Result {
Pokedex::run(Settings::default())
}

View file

@ -1,6 +1,6 @@
use iced::{slider, Column, Element, ProgressBar, Sandbox, Settings, Slider};
pub fn main() {
pub fn main() -> iced::Result {
Progress::run(Settings::default())
}

View file

@ -14,7 +14,7 @@ use iced::{
use std::time::Instant;
pub fn main() {
pub fn main() -> iced::Result {
SolarSystem::run(Settings {
antialiasing: true,
..Settings::default()

View file

@ -5,7 +5,7 @@ use iced::{
};
use std::time::{Duration, Instant};
pub fn main() {
pub fn main() -> iced::Result {
Stopwatch::run(Settings::default())
}

View file

@ -4,7 +4,7 @@ use iced::{
Scrollable, Settings, Slider, Space, Text, TextInput,
};
pub fn main() {
pub fn main() -> iced::Result {
Styling::run(Settings::default())
}

View file

@ -1,6 +1,6 @@
use iced::{Container, Element, Length, Sandbox, Settings, Svg};
pub fn main() {
pub fn main() -> iced::Result {
Tiger::run(Settings::default())
}

View file

@ -5,7 +5,7 @@ use iced::{
};
use serde::{Deserialize, Serialize};
pub fn main() {
pub fn main() -> iced::Result {
Todos::run(Settings::default())
}

View file

@ -4,7 +4,7 @@ use iced::{
Sandbox, Scrollable, Settings, Slider, Space, Text, TextInput,
};
pub fn main() {
pub fn main() -> iced::Result {
env_logger::init();
Tour::run(Settings::default())