Skip to content

Commit 6cb91b5

Browse files
committed
fix clippy warnings
1 parent 93ab53f commit 6cb91b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/ptr-union/tests/clone_unaligned.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ unsafe impl erasable::ErasablePtr for MyBox {
2929
static OFFSET: AtomicUsize = AtomicUsize::new(8);
3030

3131
impl MyBox {
32-
pub fn new() -> Self {
32+
fn new() -> Self {
3333
let offset = OFFSET.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
3434
MyBox {
3535
ptr: NonNull::new(offset as _).unwrap(),
@@ -55,6 +55,7 @@ type Union = Union8<
5555
>;
5656

5757
#[test]
58+
#[allow(clippy::redundant_clone)]
5859
#[should_panic = "but the cloned pointer wasn't sufficiently aligned"]
5960
fn test_clone_unaligned() {
6061
let bx = MyBox::new();

0 commit comments

Comments
 (0)