mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Fix some clippy issues found by 1.84.0 (#5603)
This commit is contained in:
@@ -190,7 +190,7 @@ mod rw_lock_impl {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Deref for RwLockReadGuard<'a, T> {
|
||||
impl<T> Deref for RwLockReadGuard<'_, T> {
|
||||
type Target = T;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
@@ -198,7 +198,7 @@ mod rw_lock_impl {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Drop for RwLockReadGuard<'a, T> {
|
||||
impl<T> Drop for RwLockReadGuard<'_, T> {
|
||||
fn drop(&mut self) {
|
||||
let tid = std::thread::current().id();
|
||||
self.holders.lock().remove(&tid);
|
||||
@@ -229,7 +229,7 @@ mod rw_lock_impl {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Deref for RwLockWriteGuard<'a, T> {
|
||||
impl<T> Deref for RwLockWriteGuard<'_, T> {
|
||||
type Target = T;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
@@ -237,13 +237,13 @@ mod rw_lock_impl {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> DerefMut for RwLockWriteGuard<'a, T> {
|
||||
impl<T> DerefMut for RwLockWriteGuard<'_, T> {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
self.guard.as_mut().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Drop for RwLockWriteGuard<'a, T> {
|
||||
impl<T> Drop for RwLockWriteGuard<'_, T> {
|
||||
fn drop(&mut self) {
|
||||
let tid = std::thread::current().id();
|
||||
self.holders.lock().remove(&tid);
|
||||
|
||||
@@ -993,22 +993,22 @@ impl RowBreakCandidates {
|
||||
punctuation,
|
||||
any,
|
||||
} = self;
|
||||
if space.map_or(false, |s| s < index) {
|
||||
if space.is_some_and(|s| s < index) {
|
||||
*space = None;
|
||||
}
|
||||
if cjk.map_or(false, |s| s < index) {
|
||||
if cjk.is_some_and(|s| s < index) {
|
||||
*cjk = None;
|
||||
}
|
||||
if pre_cjk.map_or(false, |s| s < index) {
|
||||
if pre_cjk.is_some_and(|s| s < index) {
|
||||
*pre_cjk = None;
|
||||
}
|
||||
if dash.map_or(false, |s| s < index) {
|
||||
if dash.is_some_and(|s| s < index) {
|
||||
*dash = None;
|
||||
}
|
||||
if punctuation.map_or(false, |s| s < index) {
|
||||
if punctuation.is_some_and(|s| s < index) {
|
||||
*punctuation = None;
|
||||
}
|
||||
if any.map_or(false, |s| s < index) {
|
||||
if any.is_some_and(|s| s < index) {
|
||||
*any = None;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user