Keep window::open impure (for now)
This commit is contained in:
parent
d7aab6c4ec
commit
bf3ac04498
4 changed files with 21 additions and 14 deletions
|
|
@ -42,12 +42,13 @@ enum Message {
|
|||
|
||||
impl Example {
|
||||
fn new() -> (Self, Task<Message>) {
|
||||
let (_, open) = window::open(window::Settings::default());
|
||||
|
||||
(
|
||||
Self {
|
||||
windows: BTreeMap::new(),
|
||||
},
|
||||
window::open(window::Settings::default())
|
||||
.map(Message::WindowOpened),
|
||||
open.map(Message::WindowOpened),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -76,10 +77,12 @@ impl Example {
|
|||
},
|
||||
);
|
||||
|
||||
window::open(window::Settings {
|
||||
let (_, open) = window::open(window::Settings {
|
||||
position,
|
||||
..window::Settings::default()
|
||||
})
|
||||
});
|
||||
|
||||
open
|
||||
})
|
||||
.map(Message::WindowOpened)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue