mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
Update MSRV from 1.76 to 1.77 (#5322)
<!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> * [X] I have followed the instructions in the PR template I am preparing a separate PR that adds support for JXL with `jxl-oxide`, which is unlikely to be added to the `image` crate anytime soon (more context will be provided in that PR). `jxl-oxide` makes use of the [`array::each_mut`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_mut) API which was stabilized in 1.77, which is the motivation for this MSRV bump. Rust 1.77 was officially released to stable on 21 March, 2024.
This commit is contained in:
@@ -2,7 +2,7 @@ use std::cell::Cell;
|
||||
use winit::event_loop::ActiveEventLoop;
|
||||
|
||||
thread_local! {
|
||||
static CURRENT_EVENT_LOOP: Cell<Option<*const ActiveEventLoop>> = Cell::new(None);
|
||||
static CURRENT_EVENT_LOOP: Cell<Option<*const ActiveEventLoop>> = const { Cell::new(None) };
|
||||
}
|
||||
|
||||
struct EventLoopGuard;
|
||||
|
||||
@@ -37,7 +37,7 @@ fn with_event_loop<R>(
|
||||
mut native_options: epi::NativeOptions,
|
||||
f: impl FnOnce(&mut EventLoop<UserEvent>, epi::NativeOptions) -> R,
|
||||
) -> Result<R> {
|
||||
thread_local!(static EVENT_LOOP: std::cell::RefCell<Option<EventLoop<UserEvent>>> = std::cell::RefCell::new(None));
|
||||
thread_local!(static EVENT_LOOP: std::cell::RefCell<Option<EventLoop<UserEvent>>> = const { std::cell::RefCell::new(None) });
|
||||
|
||||
EVENT_LOOP.with(|event_loop| {
|
||||
// Since we want to reference NativeOptions when creating the EventLoop we can't
|
||||
|
||||
Reference in New Issue
Block a user