Clippy: Fix the error of variants having the same prefix. (#31953)

* fix error: all variants have same prefix

* made the suggested changes

* fixed errors caused by commit

* silenced the clippy warning.

* ran ./mach fmt

* Update components/script/dom/htmlmediaelement.rs

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>

---------

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Aarya Khandelwal 2024-04-05 22:01:41 +05:30 committed by GitHub
parent 9ee45425e9
commit 275fad8b78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 41 additions and 45 deletions

View file

@ -412,6 +412,7 @@ pub enum NetworkState {
/// <https://html.spec.whatwg.org/multipage/#dom-media-readystate>
#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf, PartialEq, PartialOrd)]
#[repr(u8)]
#[allow(clippy::enum_variant_names)] // Clippy warning silenced here because these names are from the specification.
pub enum ReadyState {
HaveNothing = HTMLMediaElementConstants::HAVE_NOTHING as u8,
HaveMetadata = HTMLMediaElementConstants::HAVE_METADATA as u8,