Refactored ImportLayer into an enum instead of a struct and using
Option everywhere.
Details
Details
- Reviewers
emilio - Group Reviewers
layout-reviewers - Commits
- rMOZILLACENTRALd5bfc83882dd: Bug 1830656 - Refactor ImportLayer into enum r=emilio
rMOZILLACENTRAL155b9abe4a7e: Bug 1830656 - Refactor ImportLayer into enum r=emilio
rMOZILLACENTRAL8b600348f317: Bug 1830656 - Refactor ImportLayer into enum r=emilio - Bugzilla Bug ID
- 1830656
Diff Detail
Diff Detail
- Repository
- rMOZILLACENTRAL mozilla-central
- Build Status
Buildable 532792 Build 629772: arc lint + arc unit
Event Timeline
Comment Actions
Nice refactor, small comment on enum matching.
| servo/components/style/stylesheets/import_rule.rs | ||
|---|---|---|
| 282 | The more idiomatic way to check a certain enum would be: if matches!(self.layer, ImportLayer::None) { .. } That way you can also remove the PartialEq derive from ImportLayer. | |
| servo/components/style/stylesheets/import_rule.rs | ||
|---|---|---|
| 282 | Thanks, done. | |
Comment Actions
The analysis task source-test-mozlint-file-perm failed, but we could not detect any issue.
Please check this task manually.
The analysis task source-test-mozlint-file-whitespace failed, but we could not detect any issue.
Please check this task manually.
The analysis task source-test-mozlint-rustfmt failed, but we could not detect any issue.
Please check this task manually.
If you see a problem in this automated review, please report it here.