Revert "Make DOMRefCell use style’s copy of RefCell"

This reverts commit ec723057b2.
This commit is contained in:
Simon Sapin 2016-09-28 11:05:06 +02:00
parent c831369e3e
commit fbde392c3d
12 changed files with 10 additions and 35 deletions

View file

@ -15,7 +15,6 @@
#![allow(unsafe_code)]
#[cfg(feature = "servo")] use heapsize::HeapSizeOf;
use std::cell::{UnsafeCell, Cell};
use std::cmp::Ordering;
use std::fmt::{self, Debug, Display};
@ -32,13 +31,6 @@ pub struct RefCell<T: ?Sized> {
value: UnsafeCell<T>,
}
#[cfg(feature = "servo")]
impl<T: HeapSizeOf> HeapSizeOf for RefCell<T> {
fn heap_size_of_children(&self) -> usize {
self.borrow().heap_size_of_children()
}
}
/// An enumeration of values returned from the `state` method on a `RefCell<T>`.
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub enum BorrowState {
@ -535,18 +527,6 @@ impl<'b, T: ?Sized> Ref<'b, T> {
borrow: orig.borrow,
}
}
#[inline]
pub fn filter_map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Option<Ref<'b, U>>
where F: FnOnce(&T) -> Option<&U>
{
f(orig.value).map(move |new_value| {
Ref {
value: new_value,
borrow: orig.borrow,
}
})
}
}
impl<'b, T: ?Sized> RefMut<'b, T> {