1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Update MSRV from 1.88 to 1.92 (#7793)

This commit is contained in:
Jasper Riedel
2025-12-20 22:52:34 +10:00
committed by GitHub
parent 8d98763fe1
commit 661d5f9173
42 changed files with 53 additions and 53 deletions

View File

@@ -285,8 +285,8 @@ fn create_clipboard_item(mime: &str, bytes: &[u8]) -> Result<web_sys::ClipboardI
let items = js_sys::Object::new();
// SAFETY: I hope so
#[expect(unsafe_code, unused_unsafe)] // Weird false positive
// SAFETY: I hope so
unsafe {
js_sys::Reflect::set(&items, &JsValue::from_str(mime), &blob)?
};

View File

@@ -172,7 +172,7 @@ impl Area {
/// Set the [`UiStackInfo`] of the area's [`Ui`].
///
/// Default to [`UiStackInfo::new(UiKind::GenericArea)`].
/// Default to [`UiStackInfo`] with kind [`UiKind::GenericArea`].
#[inline]
pub fn info(mut self, info: UiStackInfo) -> Self {
self.info = info;

View File

@@ -336,7 +336,7 @@ impl Frame {
impl Frame {
/// How much extra space the frame uses up compared to the content.
///
/// [`Self::inner_margin`] + [`Self.stroke`]`.width` + [`Self::outer_margin`].
/// [`Self::inner_margin`] + [`Self::stroke`]`.width` + [`Self::outer_margin`].
#[inline]
pub fn total_margin(&self) -> MarginF32 {
MarginF32::from(self.inner_margin)

View File

@@ -3,7 +3,7 @@
//! Try the live web demo: <https://www.egui.rs/#demo>. Read more about egui at <https://github.com/emilk/egui>.
//!
//! `egui` is in heavy development, with each new version having breaking changes.
//! You need to have rust 1.88.0 or later to use `egui`.
//! You need to have rust 1.92.0 or later to use `egui`.
//!
//! To quickly get started with egui, you can take a look at [`eframe_template`](https://github.com/emilk/eframe_template)
//! which uses [`eframe`](https://docs.rs/eframe).

View File

@@ -14,7 +14,7 @@ use crate::{
/// It also lets you easily show a tooltip on hover.
///
/// Whenever something gets added to a [`Ui`], a [`Response`] object is returned.
/// [`ui.add`] returns a [`Response`], as does [`ui.button`], and all similar shortcuts.
/// [`Ui::add`] returns a [`Response`], as does [`Ui::button`], and all similar shortcuts.
///
/// ⚠️ The `Response` contains a clone of [`Context`], and many methods lock the `Context`.
/// It can therefore be a deadlock to use `Context` from within a context-locking closures,

View File

@@ -198,6 +198,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
let mut string = String::new();
for _ in 0..NUM_LINES {
for i in 0..30_u8 {
#[expect(clippy::unwrap_used)]
write!(string, "{i:02X} ").unwrap();
}
string.push('\n');

View File

@@ -194,7 +194,7 @@ pub fn menus_should_close_even_if_submenu_disappears() {
const OTHER_BUTTON: &str = "Other button";
const MENU_BUTTON: &str = "Menu";
const SUB_MENU_BUTTON: &str = "Always here";
const TOGGLABLE_SUB_MENU_BUTTON: &str = "Maybe here";
const TOGGLEABLE_SUB_MENU_BUTTON: &str = "Maybe here";
const INSIDE_SUB_MENU_BUTTON: &str = "Inside submenu";
for frame_delay in (0..3).rev() {
@@ -206,7 +206,7 @@ pub fn menus_should_close_even_if_submenu_disappears() {
Popup::menu(&response).show(|ui| {
let _ = ui.button(SUB_MENU_BUTTON);
if *state {
ui.menu_button(TOGGLABLE_SUB_MENU_BUTTON, |ui| {
ui.menu_button(TOGGLEABLE_SUB_MENU_BUTTON, |ui| {
let _ = ui.button(INSIDE_SUB_MENU_BUTTON);
});
}
@@ -221,7 +221,7 @@ pub fn menus_should_close_even_if_submenu_disappears() {
// Open the sub menu
harness
.get_by_label_contains(TOGGLABLE_SUB_MENU_BUTTON)
.get_by_label_contains(TOGGLEABLE_SUB_MENU_BUTTON)
.hover();
harness.run();