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
This program prints garbage to the console on my system:
let ev = iui::UI::init().unwrap();
{
let v = vec![1, 2, 3, 4];
ev.queue_main(|| {
for i in &v {
println!("{}", i);
}
});
}
ev.main();
This is a use-after-free on the vector v and should not compile. Both UI::queue_main and UI::on_should_quit must require the callback to be 'static.
This is probably the case for all functions that take a callback, not just those 2, but I just started using iui, so I don't which (if any) other functions are affected.
You can test that this code example doesn't compile using compiletest-rs.
The text was updated successfully, but these errors were encountered:
I can't seem to actually make them sound without adding a 'static bound, which is annoying but is also the way that gtk-rs does it and is probably the way to go :(
This program prints garbage to the console on my system:
This is a use-after-free on the vector
v
and should not compile. BothUI::queue_main
andUI::on_should_quit
must require the callback to be'static
.This is probably the case for all functions that take a callback, not just those 2, but I just started using iui, so I don't which (if any) other functions are affected.
You can test that this code example doesn't compile using compiletest-rs.
The text was updated successfully, but these errors were encountered: