servo: Merge #5550 - Don't consume self when calling root on a Temporary<T> (from aneeshusa:fix-issue-5540); r=jdm

Fixes issue #5540.

As far as I can tell this is all that's necessary, but I'm new to Rust, so let me know if I missed something!

Source-Repo: https://github.com/servo/servo
Source-Revision: 2089c1f285ae21789b9bff368154de3e7f49ffc7
This commit is contained in:
Aneesh Agrawal 2015-04-07 23:04:12 -05:00
Родитель 20a6cab60b
Коммит 18d9e6f48b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -174,7 +174,7 @@ impl<T: Reflectable> Temporary<T> {
}
/// Create a stack-bounded root for this value.
pub fn root(self) -> Root<T> {
pub fn root(&self) -> Root<T> {
STACK_ROOTS.with(|ref collection| {
let RootCollectionPtr(collection) = collection.get().unwrap();
unsafe {