mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 07:23:13 -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:
@@ -1,4 +1,4 @@
|
||||
#![allow(clippy::derive_hash_xor_eq)] // We need to impl Hash for f32, but we don't implement Eq, which is fine
|
||||
#![allow(clippy::derived_hash_with_manual_eq)] // We need to impl Hash for f32, but we don't implement Eq, which is fine
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ impl FontId {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::derive_hash_xor_eq)]
|
||||
#[allow(clippy::derived_hash_with_manual_eq)]
|
||||
impl std::hash::Hash for FontId {
|
||||
#[inline(always)]
|
||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
||||
@@ -552,7 +552,7 @@ impl FontsAndCache {
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
struct HashableF32(f32);
|
||||
|
||||
#[allow(clippy::derive_hash_xor_eq)]
|
||||
#[allow(clippy::derived_hash_with_manual_eq)]
|
||||
impl std::hash::Hash for HashableF32 {
|
||||
#[inline(always)]
|
||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
||||
|
||||
@@ -320,9 +320,8 @@ fn replace_last_glyph_with_overflow_character(
|
||||
job: &LayoutJob,
|
||||
row: &mut Row,
|
||||
) {
|
||||
let overflow_character = match job.wrap.overflow_character {
|
||||
Some(c) => c,
|
||||
None => return,
|
||||
let Some(overflow_character) = job.wrap.overflow_character else {
|
||||
return;
|
||||
};
|
||||
|
||||
loop {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![allow(clippy::derive_hash_xor_eq)] // We need to impl Hash for f32, but we don't implement Eq, which is fine
|
||||
#![allow(clippy::derived_hash_with_manual_eq)] // We need to impl Hash for f32, but we don't implement Eq, which is fine
|
||||
#![allow(clippy::wrong_self_convention)] // We use `from_` to indicate conversion direction. It's non-diomatic, but makes sense in this context.
|
||||
|
||||
use std::ops::Range;
|
||||
|
||||
Reference in New Issue
Block a user