Make Application and Sandbox return a Result
This commit is contained in:
parent
faa12382d4
commit
c1f79b40cf
40 changed files with 166 additions and 58 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ use iced::{
|
|||
Slider, Text,
|
||||
};
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Example::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use iced::{
|
|||
|
||||
mod download;
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Example::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use iced::{
|
|||
Element, Length, Settings, Subscription, Text,
|
||||
};
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Events::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ use iced::{
|
|||
};
|
||||
use rainbow::Rainbow;
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Example::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::{
|
|||
Settings, Text,
|
||||
};
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Example::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use iced::{
|
|||
Sandbox, Scrollable, Settings, Space, Text,
|
||||
};
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Example::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use iced::{
|
|||
};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Stopwatch::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::{
|
|||
Scrollable, Settings, Slider, Space, Text, TextInput,
|
||||
};
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Styling::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use iced::{Container, Element, Length, Sandbox, Settings, Svg};
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Tiger::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use iced::{
|
|||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub fn main() {
|
||||
pub fn main() -> iced::Result {
|
||||
Todos::run(Settings::default())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue