diff --git a/crates/ecolor/src/lib.rs b/crates/ecolor/src/lib.rs index 06bf5539..431e51d8 100644 --- a/crates/ecolor/src/lib.rs +++ b/crates/ecolor/src/lib.rs @@ -12,8 +12,6 @@ #[cfg(feature = "cint")] mod cint_impl; -#[cfg(feature = "cint")] -pub use cint_impl::*; mod color32; pub use color32::*; diff --git a/crates/egui-wgpu/src/lib.rs b/crates/egui-wgpu/src/lib.rs index 447f717b..c2ce3e5b 100644 --- a/crates/egui-wgpu/src/lib.rs +++ b/crates/egui-wgpu/src/lib.rs @@ -274,7 +274,7 @@ pub fn preferred_framebuffer_format( } formats - .get(0) + .first() .copied() .ok_or(WgpuError::NoSurfaceFormatsAvailable) } diff --git a/crates/egui/src/id.rs b/crates/egui/src/id.rs index fe42d20f..098b1b10 100644 --- a/crates/egui/src/id.rs +++ b/crates/egui/src/id.rs @@ -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. diff --git a/crates/egui_demo_app/src/main.rs b/crates/egui_demo_app/src/main.rs index d81ceddd..45b0ee06 100644 --- a/crates/egui_demo_app/src/main.rs +++ b/crates/egui_demo_app/src/main.rs @@ -1,6 +1,7 @@ //! Demo app for egui #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release +#![allow(clippy::never_loop)] // False positive // When compiling natively: fn main() -> Result<(), eframe::Error> { diff --git a/crates/egui_demo_lib/src/lib.rs b/crates/egui_demo_lib/src/lib.rs index f45b1f6d..cf31ee8d 100644 --- a/crates/egui_demo_lib/src/lib.rs +++ b/crates/egui_demo_lib/src/lib.rs @@ -18,7 +18,7 @@ mod demo; pub mod easy_mark; pub use color_test::ColorTest; -pub use demo::DemoWindows; +pub use demo::{DemoWindows, WidgetGallery}; /// View some Rust code with syntax highlighting and selection. pub(crate) fn rust_view_ui(ui: &mut egui::Ui, code: &str) { diff --git a/crates/egui_extras/src/syntax_highlighting.rs b/crates/egui_extras/src/syntax_highlighting.rs index 8708dcf9..aced1ad5 100644 --- a/crates/egui_extras/src/syntax_highlighting.rs +++ b/crates/egui_extras/src/syntax_highlighting.rs @@ -3,6 +3,8 @@ //! Turn on the `syntect` feature for great syntax highlighting of any language. //! Otherwise, a very simple fallback will be used, that works okish for C, C++, Rust, and Python. +#![allow(clippy::mem_forget)] // False positive from enum_map macro + use egui::text::LayoutJob; /// View some code with syntax highlighting and selection.