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

Update MSRV to Rust 1.79 (#5421)

Mostly to fix `cargo-machete` CI
This commit is contained in:
Emil Ernerfeldt
2024-12-01 18:58:35 +01:00
committed by GitHub
parent 7e3275ca5c
commit 328422dc62
50 changed files with 94 additions and 103 deletions

View File

@@ -39,7 +39,7 @@ pub struct State {
scroll_start_offset_from_top_left: [Option<f32>; 2],
/// Is the scroll sticky. This is true while scroll handle is in the end position
/// and remains that way until the user moves the scroll_handle. Once unstuck (false)
/// and remains that way until the user moves the `scroll_handle`. Once unstuck (false)
/// it remains false until the scroll touches the end position, which reenables stickiness.
scroll_stuck_to_end: Vec2b,

View File

@@ -55,7 +55,7 @@ pub enum Key {
// `]`
CloseBracket,
/// \`, also known as "backquote" or "grave"
/// Also known as "backquote" or "grave"
Backtick,
/// `-`

View File

@@ -889,9 +889,9 @@ impl Default for PointerState {
press_start_time: None,
has_moved_too_much_for_a_click: false,
started_decidedly_dragging: false,
last_click_time: std::f64::NEG_INFINITY,
last_last_click_time: std::f64::NEG_INFINITY,
last_move_time: std::f64::NEG_INFINITY,
last_click_time: f64::NEG_INFINITY,
last_last_click_time: f64::NEG_INFINITY,
last_move_time: f64::NEG_INFINITY,
pointer_events: vec![],
input_options: Default::default(),
}

View File

@@ -2,7 +2,7 @@ use crate::{
emath::{pos2, vec2, Align2, NumExt, Pos2, Rect, Vec2},
Align,
};
use std::f32::INFINITY;
const INFINITY: f32 = f32::INFINITY;
// ----------------------------------------------------------------------------

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.77.0 or later to use `egui`.
//! You need to have rust 1.79.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

@@ -736,7 +736,7 @@ impl Focus {
let current_rect = self.focus_widgets_cache.get(&current_focused.id)?;
let mut best_score = std::f32::INFINITY;
let mut best_score = f32::INFINITY;
let mut best_id = None;
for (candidate_id, candidate_rect) in &self.focus_widgets_cache {

View File

@@ -288,7 +288,7 @@ pub struct Style {
/// If true and scrolling is enabled for only one direction, allow horizontal scrolling without pressing shift
pub always_scroll_the_only_direction: bool,
/// The animation that should be used when scrolling a [`crate::ScrollArea`] using e.g. [Ui::scroll_to_rect].
/// The animation that should be used when scrolling a [`crate::ScrollArea`] using e.g. [`Ui::scroll_to_rect`].
pub scroll_animation: ScrollAnimation,
}

View File

@@ -1030,7 +1030,7 @@ impl<'a> Widget for Slider<'a> {
// Logarithmic sliders are allowed to include zero and infinity,
// even though mathematically it doesn't make sense.
use std::f64::INFINITY;
const INFINITY: f64 = f64::INFINITY;
/// When the user asks for an infinitely large range (e.g. logarithmic from zero),
/// give a scale that this many orders of magnitude in size.