mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Improve clippy, and add more docs (#3306)
* Silence a few clippy warnings * Use named threads * Remove some deprecated functions * Document Context and Ui fully * Use `parking_lot::Mutex` in `eframe` * Expand clippy.toml files * build fix
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#![allow(clippy::many_single_char_names)]
|
||||
#![allow(clippy::wrong_self_convention)] // False positives
|
||||
|
||||
use std::ops::Range;
|
||||
|
||||
use crate::{shape::Shape, Color32, PathShape, Stroke};
|
||||
|
||||
@@ -374,6 +374,8 @@ where
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#![allow(clippy::disallowed_methods)] // Ok for tests
|
||||
|
||||
use crate::mutex::Mutex;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -414,6 +416,8 @@ mod tests {
|
||||
#[cfg(feature = "deadlock_detection")]
|
||||
#[cfg(test)]
|
||||
mod tests_rwlock {
|
||||
#![allow(clippy::disallowed_methods)] // Ok for tests
|
||||
|
||||
use crate::mutex::RwLock;
|
||||
use std::time::Duration;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#![allow(clippy::derive_hash_xor_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;
|
||||
use std::sync::Arc;
|
||||
|
||||
Reference in New Issue
Block a user