mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Update MSRV to Rust 1.70.0 (#3310)
* Update to Rust 1.70 * Fix renamed clippy lint * Use let-else more * Code cleanup * Remove derelict Safety comments * Enable more clippy lints
This commit is contained in:
@@ -4,7 +4,7 @@ version = "0.22.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
description = "Bindings for using egui with winit"
|
||||
edition = "2021"
|
||||
rust-version = "1.67"
|
||||
rust-version = "1.70"
|
||||
homepage = "https://github.com/emilk/egui/tree/master/crates/egui-winit"
|
||||
license = "MIT OR Apache-2.0"
|
||||
readme = "README.md"
|
||||
|
||||
@@ -26,10 +26,6 @@ pub struct Clipboard {
|
||||
|
||||
impl Clipboard {
|
||||
/// Construct a new instance
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// The returned `Clipboard` must not outlive the input `_display_target`.
|
||||
pub fn new(_display_target: &dyn HasRawDisplayHandle) -> Self {
|
||||
Self {
|
||||
#[cfg(all(feature = "arboard", not(target_os = "android")))]
|
||||
|
||||
@@ -84,10 +84,6 @@ pub struct State {
|
||||
|
||||
impl State {
|
||||
/// Construct a new instance
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// The returned `State` must not outlive the input `display_target`.
|
||||
pub fn new(display_target: &dyn HasRawDisplayHandle) -> Self {
|
||||
let egui_input = egui::RawInput {
|
||||
focused: false, // winit will tell us when we have focus
|
||||
|
||||
@@ -137,12 +137,10 @@ fn clamp_pos_to_monitors<E>(
|
||||
let monitors = event_loop.available_monitors();
|
||||
|
||||
// default to primary monitor, in case the correct monitor was disconnected.
|
||||
let mut active_monitor = if let Some(active_monitor) = event_loop
|
||||
let Some(mut active_monitor) = event_loop
|
||||
.primary_monitor()
|
||||
.or_else(|| event_loop.available_monitors().next())
|
||||
{
|
||||
active_monitor
|
||||
} else {
|
||||
else {
|
||||
return; // no monitors 🤷
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user