1
0
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:
Emil Ernerfeldt
2023-09-06 07:59:24 +02:00
committed by GitHub
parent 707ca04c08
commit 82704bebbf
52 changed files with 102 additions and 87 deletions

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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;