Closed
Description
I was changing some code from integer constants to a proper enum and was greeted by the following warning:
Compiling script v0.0.1 (file:///Users/nox/src/servo/components/script)
warning: variant is never used: `HaveMetadata`
--> /Users/nox/src/servo/components/script/dom/htmlmediaelement.rs:88:5
|
88 | HaveMetadata = HTMLMediaElementConstants::HAVE_METADATA as u8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
The warning sounded weird to me because I was pattern-matching on that damn variant in various places of the code; but I was pointed out to the fact that I wasn't actually creating that value.
Maybe the warning should be rewritten to explicitly mention value creation?
Cc @arielb1