Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake AttrValue's tokens() and atom() return or panic #7479
Closed
Labels
Comments
|
Is this what you intend
|
|
@psdh Yes. |
|
Actually no, without the Some(_). And with a message passed to panic!(). |
|
What is the reason to prefer |
bors-servo
pushed a commit
that referenced
this issue
Sep 2, 2015
make AttrVal tokens() and atom() return or panic Fixes #7479 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7511) <!-- Reviewable:end -->
bors-servo
pushed a commit
that referenced
this issue
Sep 2, 2015
make AttrVal tokens() and atom() return or panic Fixes #7479 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7511) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no reason an AttrValue should change variant once set, so we should refactor the API accordingly. This allows us to have better consistent panic messages in such cases.