Skip to content

Commit

Permalink
Further clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jun 19, 2024
1 parent 1f2f6d4 commit 43cbe6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions packages/dom/src/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::Item> {
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::Item> {
// self.0.next().copied().map(NodeId::from)
// }
// }

pub struct RefCellChildIter<'a> {
items: Ref<'a, [usize]>,
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/src/stylo_to_parley.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 43cbe6b

Please sign in to comment.