Skip to content

Commit

Permalink
Remove redundant Aligner
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyyzy committed Oct 26, 2021
1 parent 29b1248 commit f546637
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions library/std/src/sync/mpsc/cache_aligned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ use crate::ops::{Deref, DerefMut};

#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(align(64))]
pub(super) struct Aligner;

#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub(super) struct CacheAligned<T>(pub T, pub Aligner);
pub(super) struct CacheAligned<T>(pub T);

impl<T> Deref for CacheAligned<T> {
type Target = T;
Expand All @@ -22,6 +19,6 @@ impl<T> DerefMut for CacheAligned<T> {

impl<T> CacheAligned<T> {
pub(super) fn new(t: T) -> Self {
CacheAligned(t, Aligner)
CacheAligned(t)
}
}

0 comments on commit f546637

Please sign in to comment.