1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

Fix some clippy 1.75 lints (#3754)

This commit is contained in:
Emil Ernerfeldt
2023-12-30 11:23:21 +01:00
committed by GitHub
parent 4487f8ff9f
commit 9951fe0d36
6 changed files with 6 additions and 8 deletions

View File

@@ -43,10 +43,7 @@ impl Id {
/// Generate a new [`Id`] by hashing some source (e.g. a string or integer).
pub fn new(source: impl std::hash::Hash) -> Id {
use std::hash::{BuildHasher, Hasher};
let mut hasher = epaint::ahash::RandomState::with_seeds(1, 2, 3, 4).build_hasher();
source.hash(&mut hasher);
Id(hasher.finish())
Id(epaint::ahash::RandomState::with_seeds(1, 2, 3, 4).hash_one(source))
}
/// Generate a new [`Id`] by hashing the parent [`Id`] and the given argument.