diff options
author | 2024-05-08 19:16:06 +0900 | |
---|---|---|
committer | 2024-05-08 19:16:06 +0900 | |
commit | 477887b3870aa5fbdab96c3a06f3b930462d7842 (patch) | |
tree | 2b3272bb178f8757169511966589fe6a106733f4 /src | |
parent | 0ebe0629cef37aee5c48b9409fc36618a3a3e60d (diff) | |
parent | e07b42ac96b8d098a883c93afe828a439f479c7b (diff) | |
download | iced-477887b3870aa5fbdab96c3a06f3b930462d7842.tar.gz iced-477887b3870aa5fbdab96c3a06f3b930462d7842.tar.bz2 iced-477887b3870aa5fbdab96c3a06f3b930462d7842.zip |
Merge branch 'master' of https://github.com/iced-rs/iced into iced-rs-master
Diffstat (limited to 'src')
-rw-r--r-- | src/application.rs | 19 | ||||
-rw-r--r-- | src/lib.rs | 5 | ||||
-rw-r--r-- | src/window/icon.rs | 2 |
3 files changed, 6 insertions, 20 deletions
diff --git a/src/application.rs b/src/application.rs index 9197834b..d12ba73d 100644 --- a/src/application.rs +++ b/src/application.rs @@ -212,26 +212,11 @@ where ..crate::graphics::Settings::default() }; - let run = crate::shell::application::run::< + Ok(crate::shell::application::run::< Instance<Self>, Self::Executor, <Self::Renderer as compositor::Default>::Compositor, - >(settings.into(), renderer_settings); - - #[cfg(target_arch = "wasm32")] - { - use crate::futures::FutureExt; - use iced_futures::backend::wasm::wasm_bindgen::Executor; - - Executor::new() - .expect("Create Wasm executor") - .spawn(run.map(|_| ())); - - Ok(()) - } - - #[cfg(not(target_arch = "wasm32"))] - Ok(crate::futures::executor::block_on(run)?) + >(settings.into(), renderer_settings)?) } } @@ -51,6 +51,7 @@ //! We start by modelling the __state__ of our application: //! //! ``` +//! #[derive(Default)] //! struct Counter { //! // The counter value //! value: i32, @@ -199,8 +200,8 @@ pub use crate::core::gradient; pub use crate::core::theme; pub use crate::core::{ Alignment, Background, Border, Color, ContentFit, Degrees, Gradient, - Length, Padding, Pixels, Point, Radians, Rectangle, Shadow, Size, Theme, - Transformation, Vector, + Length, Padding, Pixels, Point, Radians, Rectangle, Rotation, Shadow, Size, + Theme, Transformation, Vector, }; pub mod clipboard { diff --git a/src/window/icon.rs b/src/window/icon.rs index ef71c228..7fe4ca7b 100644 --- a/src/window/icon.rs +++ b/src/window/icon.rs @@ -54,7 +54,7 @@ pub enum Error { InvalidError(#[from] icon::Error), /// The underlying OS failed to create the icon. - #[error("The underlying OS failted to create the window icon: {0}")] + #[error("The underlying OS failed to create the window icon: {0}")] OsError(#[from] io::Error), /// The `image` crate reported an error. |