You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My hardware is compatible and my graphics drivers are up-to-date.
What happened?
If you add another toast in the new method and then run the example and wait 5 seconds it will crash, because the program tries to remove a toast at position 1, but there is only 1 toast left in the Vec, so the program panics.
How the new method should look to reproduce:
fnnew(_flags:()) -> (Self,Command<Message>){(App{toasts:vec![Toast{
title: "Example Toast".into(),
body: "Add more toasts in the form below!".into(),
status: Status::Primary,
},
Toast{
title: "Example Toast 2".into(),
body: "Add more toasts in the form below!".into(),
status: Status::Primary,
}],timeout_secs: toast::DEFAULT_TIMEOUT,
..Default::default()},Command::none(),)}
What is the expected behavior?
That the program didn't panic and just removed both toast without a problem.
Version
master
Operating System
Windows
Do you have any log output?
thread 'main' panicked at examples\toast\src\main.rs:82:29:
removal index (is 1) should be < len (is 1)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\toast.exe` (exit code: 101)
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Is this issue related to iced?
What happened?
If you add another toast in the new method and then run the example and wait 5 seconds it will crash, because the program tries to remove a toast at position 1, but there is only 1 toast left in the Vec, so the program panics.
How the
new
method should look to reproduce:What is the expected behavior?
That the program didn't panic and just removed both toast without a problem.
Version
master
Operating System
Windows
Do you have any log output?
The text was updated successfully, but these errors were encountered: