diff options
Diffstat (limited to 'components/shared/profile')
-rw-r--r-- | components/shared/profile/Cargo.toml | 1 | ||||
-rw-r--r-- | components/shared/profile/time.rs | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/components/shared/profile/Cargo.toml b/components/shared/profile/Cargo.toml index 8f3c4beae5a..ca5213ee451 100644 --- a/components/shared/profile/Cargo.toml +++ b/components/shared/profile/Cargo.toml @@ -22,5 +22,6 @@ log = { workspace = true } serde = { workspace = true } servo_config = { path = "../../config" } signpost = { git = "https://github.com/pcwalton/signpost.git" } +strum_macros = { workspace = true } time = { workspace = true } tracing = { workspace = true, optional = true } diff --git a/components/shared/profile/time.rs b/components/shared/profile/time.rs index 78c380b70dc..0531b68e09e 100644 --- a/components/shared/profile/time.rs +++ b/components/shared/profile/time.rs @@ -7,6 +7,7 @@ use ipc_channel::ipc::IpcSender; use log::warn; use serde::{Deserialize, Serialize}; use servo_config::opts; +use strum_macros::IntoStaticStr; use time::Duration; #[derive(Clone, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize)] @@ -57,7 +58,9 @@ pub enum ProfilerMsg { /// Usage sites of variants marked “Rust tracing only” are not visible to rust-analyzer. #[repr(u32)] -#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] +#[derive( + Clone, Copy, Debug, Deserialize, Eq, Hash, IntoStaticStr, Ord, PartialEq, PartialOrd, Serialize, +)] pub enum ProfilerCategory { /// The compositor is rasterising or presenting. /// |