mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: Add a TLS-based style struct caching mechanism.
This commit is contained in:
parent
298b1363ff
commit
c34c92e904
18 changed files with 278 additions and 13 deletions
|
@ -122,6 +122,12 @@ impl<T: ?Sized + 'static> PartialEq for NonZeroPtrMut<T> {
|
|||
|
||||
impl<T: ?Sized + 'static> Eq for NonZeroPtrMut<T> {}
|
||||
|
||||
impl<T: Sized + 'static> Hash for NonZeroPtrMut<T> {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.ptr().hash(state)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Arc<T: ?Sized + 'static> {
|
||||
p: NonZeroPtrMut<ArcInner<T>>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue