mirror of
https://github.com/servo/servo.git
synced 2025-10-01 00:59:15 +01: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
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -1123,6 +1123,7 @@ dependencies = [
|
|||
"pixels",
|
||||
"script_traits",
|
||||
"servo_url",
|
||||
"strum_macros",
|
||||
"style_traits",
|
||||
"webrender_api",
|
||||
"webrender_traits",
|
||||
|
@ -1907,6 +1908,7 @@ dependencies = [
|
|||
"serde",
|
||||
"servo_malloc_size_of",
|
||||
"servo_url",
|
||||
"strum_macros",
|
||||
"style_traits",
|
||||
"url",
|
||||
"webdriver",
|
||||
|
@ -5854,6 +5856,7 @@ dependencies = [
|
|||
"serde",
|
||||
"servo_config",
|
||||
"signpost",
|
||||
"strum_macros",
|
||||
"time",
|
||||
"tracing",
|
||||
]
|
||||
|
@ -6349,6 +6352,8 @@ dependencies = [
|
|||
"servo_rand",
|
||||
"servo_url",
|
||||
"smallvec",
|
||||
"strum",
|
||||
"strum_macros",
|
||||
"style",
|
||||
"style_traits",
|
||||
"stylo_atoms",
|
||||
|
@ -6466,6 +6471,7 @@ dependencies = [
|
|||
"serde",
|
||||
"servo_malloc_size_of",
|
||||
"servo_url",
|
||||
"strum_macros",
|
||||
"style_traits",
|
||||
"stylo_atoms",
|
||||
"uuid",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue