Page MenuHomePhabricator

Bug 1830656 - Refactor ImportLayer into enum
ClosedPublic

Authored by canadahonk on Apr 30 2023, 7:27 PM.
Referenced Files
Unknown Object (File)
Nov 15 2025, 11:58 AM
Unknown Object (File)
Nov 15 2025, 3:33 AM
Unknown Object (File)
Nov 14 2025, 12:36 AM
Unknown Object (File)
Nov 13 2025, 10:36 AM
Unknown Object (File)
Nov 9 2025, 1:19 AM
Unknown Object (File)
Nov 4 2025, 10:27 PM
Unknown Object (File)
Nov 4 2025, 10:23 PM
Unknown Object (File)
Oct 15 2025, 3:13 PM

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.

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.

canadahonk added inline comments.
servo/components/style/stylesheets/import_rule.rs
282

Thanks, done.

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.

This revision is now accepted and ready to land.May 1 2023, 12:53 PM
This revision is now accepted and ready to land.May 1 2023, 3:49 PM
This revision is now accepted and ready to land.May 1 2023, 7:43 PM