Skip to content

Commit

Permalink
chore: rename dropping_copy_types lint
Browse files Browse the repository at this point in the history
CI needs to be appeased
  • Loading branch information
Jules-Bertholet authored and taiki-e committed Jun 12, 2023
1 parent 57750c2 commit e784567
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crossbeam-channel/tests/mpsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//! - https://www.rust-lang.org/en-US/legal.html

#![allow(
clippy::drop_copy,
dropping_copy_types,
clippy::match_single_binding,
clippy::redundant_clone
)]
Expand Down
2 changes: 1 addition & 1 deletion crossbeam-channel/tests/ready.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Tests for channel readiness using the `Select` struct.

#![allow(clippy::drop_copy)]
#![allow(dropping_copy_types)]

use std::any::Any;
use std::cell::Cell;
Expand Down
2 changes: 1 addition & 1 deletion crossbeam-channel/tests/select.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Tests for channel selection using the `Select` struct.

#![allow(clippy::drop_copy)]
#![allow(dropping_copy_types)]

use std::any::Any;
use std::cell::Cell;
Expand Down
2 changes: 1 addition & 1 deletion crossbeam-channel/tests/select_macro.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Tests for the `select!` macro.

#![forbid(unsafe_code)] // select! is safe.
#![allow(clippy::drop_copy, clippy::match_single_binding)]
#![allow(dropping_copy_types, clippy::match_single_binding)]

use std::any::Any;
use std::cell::Cell;
Expand Down
2 changes: 1 addition & 1 deletion crossbeam-epoch/src/deferred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Deferred {

#[cfg(all(test, not(crossbeam_loom)))]
mod tests {
#![allow(clippy::drop_copy)]
#![allow(dropping_copy_types)]

use super::Deferred;
use std::cell::Cell;
Expand Down
8 changes: 4 additions & 4 deletions crossbeam-skiplist/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1768,10 +1768,10 @@ impl<'a, K: 'a, V: 'a> RefIter<'a, K, V> {
/// Decrements the reference count of `RefEntry` owned by the iterator.
pub fn drop_impl(&mut self, guard: &Guard) {
self.parent.check_guard(guard);
if let Some(e) = mem::replace(&mut self.head, None) {
if let Some(e) = self.head.take() {
unsafe { e.node.decrement(guard) };
}
if let Some(e) = mem::replace(&mut self.tail, None) {
if let Some(e) = self.tail.take() {
unsafe { e.node.decrement(guard) };
}
}
Expand Down Expand Up @@ -1985,10 +1985,10 @@ where
/// Decrements a reference count owned by this iterator.
pub fn drop_impl(&mut self, guard: &Guard) {
self.parent.check_guard(guard);
if let Some(e) = mem::replace(&mut self.head, None) {
if let Some(e) = self.head.take() {
unsafe { e.node.decrement(guard) };
}
if let Some(e) = mem::replace(&mut self.tail, None) {
if let Some(e) = self.tail.take() {
unsafe { e.node.decrement(guard) };
}
}
Expand Down
4 changes: 2 additions & 2 deletions crossbeam-utils/src/sync/sharded_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ impl<T: ?Sized> ShardedLock<T> {
for shard in self.shards[0..i].iter().rev() {
unsafe {
let dest: *mut _ = shard.write_guard.get();
let guard = mem::replace(&mut *dest, None);
let guard = (*dest).take();
drop(guard);
}
}
Expand Down Expand Up @@ -526,7 +526,7 @@ impl<T: ?Sized> Drop for ShardedLockWriteGuard<'_, T> {
for shard in self.lock.shards.iter().rev() {
unsafe {
let dest: *mut _ = shard.write_guard.get();
let guard = mem::replace(&mut *dest, None);
let guard = (*dest).take();
drop(guard);
}
}
Expand Down

0 comments on commit e784567

Please sign in to comment.