diff --git a/packages/dom/src/layout/mod.rs b/packages/dom/src/layout/mod.rs index 4916dd5a0..94e100f3d 100644 --- a/packages/dom/src/layout/mod.rs +++ b/packages/dom/src/layout/mod.rs @@ -411,13 +411,13 @@ impl PrintTree for Document { } } -pub struct ChildIter<'a>(std::slice::Iter<'a, usize>); -impl<'a> Iterator for ChildIter<'a> { - type Item = NodeId; - fn next(&mut self) -> Option { - self.0.next().copied().map(NodeId::from) - } -} +// pub struct ChildIter<'a>(std::slice::Iter<'a, usize>); +// impl<'a> Iterator for ChildIter<'a> { +// type Item = NodeId; +// fn next(&mut self) -> Option { +// self.0.next().copied().map(NodeId::from) +// } +// } pub struct RefCellChildIter<'a> { items: Ref<'a, [usize]>, diff --git a/packages/dom/src/stylo_to_parley.rs b/packages/dom/src/stylo_to_parley.rs index f5a724db4..066eb0e42 100644 --- a/packages/dom/src/stylo_to_parley.rs +++ b/packages/dom/src/stylo_to_parley.rs @@ -72,7 +72,7 @@ pub(crate) fn style(style: &stylo::ComputedValues) -> parley::TextStyle<'static, } // TODO: fix leak! - parley::FontFamily::Named(name.to_string().leak()) + break 'ret parley::FontFamily::Named(name.to_string().leak()); } } stylo::SingleFontFamily::Generic(generic) => {