Fix inconsistent strum dependencies and imports (#40907)

The `scripts_traits` crate was the only crate depending on `strum` with
the
`derive` feature. This accidentally allowed other crates to import strum
macros via `strum::` without declaring their own dependency on
`strum_macros`,
causing compilation issues when running `./mach test-unit -p net`.

This PR makes the imports consistent across the code base by:
- replacing all `strum_macro::` imports with `strum::` imports
- removing strum_macro dependencies
- adding derive feature to the strum workspace

Testing: Unit tests continue to pass

Signed-off-by: Jan Varga <jvarga@igalia.com>
This commit is contained in:
Jan Varga
2025-11-26 22:37:55 +01:00
committed by GitHub
parent 92312fdb3a
commit 0899b87dd4
17 changed files with 14 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ use net_traits::{FetchMetadata, NetworkError, ReferrerPolicy, ResourceFetchTimin
pub use nom_rfc8288::complete::LinkDataOwned as LinkHeader;
use nom_rfc8288::complete::link_lenient as parse_link_header;
use servo_url::{ImmutableOrigin, ServoUrl};
use strum_macros::IntoStaticStr;
use strum::IntoStaticStr;
use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::refcounted::Trusted;