mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use strum
to iterate through enum variants and get their names (#35933)
`strum` allows us to avoid manually listing enum variant names and also to get their names as static strings. We cannot use this for all cases due to https://github.com/Peternator7/strum/issues/152, but we can still use it to remove a lot of code. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
959720db0a
commit
294a649a6c
17 changed files with 51 additions and 285 deletions
|
@ -131,6 +131,8 @@ smallvec = "1.14"
|
|||
static_assertions = "1.1"
|
||||
string_cache = "0.8"
|
||||
string_cache_codegen = "0.5"
|
||||
strum = "0.26"
|
||||
strum_macros = "0.26"
|
||||
style = { git = "https://github.com/servo/stylo", branch = "2025-03-11", features = ["servo"] }
|
||||
stylo_config = { git = "https://github.com/servo/stylo", branch = "2025-03-11" }
|
||||
stylo_dom = { git = "https://github.com/servo/stylo", branch = "2025-03-11" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue