Use triomphe instead of servo_arc

That's a fork of servo_arc which is updated more recently
This commit is contained in:
Olivier Goffart 2020-07-17 17:13:51 +02:00
parent 2f0718bffa
commit e7d2c35a07
3 changed files with 16 additions and 16 deletions

View file

@ -1,7 +1,7 @@
//! module for the SharedArray and related things
use core::mem::MaybeUninit;
use servo_arc::ThinArc;
use std::{fmt::Debug, fmt::Display, ops::Deref};
use triomphe::{Arc, HeaderWithLength, ThinArc};
#[derive(Clone)]
#[repr(C)]
@ -81,8 +81,8 @@ impl<T: Clone> SharedArray<T> {
let iter = PaddingFillingIter::new(len, item_iter);
SharedArray {
inner: servo_arc::Arc::into_thin(servo_arc::Arc::from_header_and_iter(
servo_arc::HeaderWithLength::new(len, iter.size_hint().0),
inner: Arc::into_thin(Arc::from_header_and_iter(
HeaderWithLength::new(len, iter.size_hint().0),
iter,
)),
}
@ -110,8 +110,8 @@ impl<T: Clone + Copy + Default + Sized + 'static> StaticNull for T {
let null_iter = &mut std::iter::empty();
let iter = PaddingFillingIter::new(len, null_iter);
servo_arc::Arc::into_thin(servo_arc::Arc::from_header_and_iter(
servo_arc::HeaderWithLength::new(len, iter.size_hint().0),
Arc::into_thin(Arc::from_header_and_iter(
HeaderWithLength::new(len, iter.size_hint().0),
iter,
))
});