Fix some clippy 1.75 lints (#3754)
This commit is contained in:
parent
4487f8ff9f
commit
9951fe0d36
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
#[cfg(feature = "cint")]
|
||||
mod cint_impl;
|
||||
#[cfg(feature = "cint")]
|
||||
pub use cint_impl::*;
|
||||
|
||||
mod color32;
|
||||
pub use color32::*;
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ pub fn preferred_framebuffer_format(
|
|||
}
|
||||
|
||||
formats
|
||||
.get(0)
|
||||
.first()
|
||||
.copied()
|
||||
.ok_or(WgpuError::NoSurfaceFormatsAvailable)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue