diff options
Diffstat (limited to 'winit/src/system.rs')
-rw-r--r-- | winit/src/system.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/winit/src/system.rs b/winit/src/system.rs index c5a5b219..7997f311 100644 --- a/winit/src/system.rs +++ b/winit/src/system.rs @@ -1,15 +1,13 @@ //! Access the native system. use crate::graphics::compositor; -use crate::runtime::command::{self, Command}; use crate::runtime::system::{Action, Information}; +use crate::runtime::{self, Task}; /// Query for available system information. -pub fn fetch_information<Message>( - f: impl Fn(Information) -> Message + Send + 'static, -) -> Command<Message> { - Command::single(command::Action::System(Action::QueryInformation( - Box::new(f), - ))) +pub fn fetch_information() -> Task<Information> { + Task::oneshot(|channel| { + runtime::Action::System(Action::QueryInformation(channel)) + }) } pub(crate) fn information( |