зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
20a6cab60b
Коммит
18d9e6f48b
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче