From 875e3870049d2523ec349724d692a11665562d40 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Sat, 18 Jan 2025 16:36:15 -0500 Subject: script: Feature-gate all crown support. (#35055) * script: Feature-gate all crown support. Signed-off-by: Josh Matthews * script: Use cfg(crown) instead of a cargo feature. Signed-off-by: Josh Matthews --------- Signed-off-by: Josh Matthews --- components/script/document_collection.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components/script/document_collection.rs') diff --git a/components/script/document_collection.rs b/components/script/document_collection.rs index 66563b55513..846efe1d44d 100644 --- a/components/script/document_collection.rs +++ b/components/script/document_collection.rs @@ -18,7 +18,7 @@ use crate::dom::window::Window; /// This is stored as a mapping of [`PipelineId`] to [`Document`], but for updating the /// rendering, [`Document`]s should be processed in order via [`Self::documents_in_order`]. #[derive(JSTraceable)] -#[crown::unrooted_must_root_lint::must_root] +#[cfg_attr(crown, crown::unrooted_must_root_lint::must_root)] pub(crate) struct DocumentCollection { map: HashMapTracedValues>, } @@ -92,7 +92,7 @@ impl DocumentCollection { } impl Default for DocumentCollection { - #[allow(crown::unrooted_must_root)] + #[cfg_attr(crown, allow(crown::unrooted_must_root))] fn default() -> Self { Self { map: HashMapTracedValues::new(), @@ -100,7 +100,7 @@ impl Default for DocumentCollection { } } -#[allow(crown::unrooted_must_root)] +#[cfg_attr(crown, allow(crown::unrooted_must_root))] pub(crate) struct DocumentsIter<'a> { iter: hash_map::Iter<'a, PipelineId, Dom>, } -- cgit v1.2.3