Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite uses of .get().map(|foo| foo.root()) and .get().map(Root::from_rooted) to .get_rooted() #7929

Closed
jdm opened this issue Oct 8, 2015 · 0 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Oct 8, 2015

There are a bunch of these that can be found with some searching like http://mxr.mozilla.org/servo/search?string=.get%28%29.map&find=&findi=&filter=root&hitlimit=&tree=servo . We are specifically interested in rewriting the ones that are calling .get() on MutNullableHeap values when they should really be calling .get_rooted() instead.

@frewsxcv frewsxcv added the C-assigned label Oct 8, 2015
bors-servo pushed a commit that referenced this issue Oct 9, 2015
Refactor away duplication of get_rooted functionality

Refactor .get().map(Root::from_rooted)
and .get().map(|foo| foo.root())
to .get_rooted() on MutNullableHeap objects.

First part done mechanically with the following comand:
sed -i s/"get().map(Root::from_rooted)"/"get_rooted()"/g *.rs

Second part done manually after finding them with
git grep ".get().map("

Fixes #7929.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7932)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.