Skip to content

Commit

Permalink
Fix more clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Oct 4, 2024
1 parent f4c9a5a commit 82d23ff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/blitz/src/renderer/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub struct VelloSceneGenerator<'dom> {
devtools: Devtools,
}

impl<'dom> VelloSceneGenerator<'dom> {
impl VelloSceneGenerator<'_> {
fn node_position(&self, node: usize, location: Point) -> (Layout, Point) {
let layout = self.layout(node);
let pos = location + Vec2::new(layout.location.x as f64, layout.location.y as f64);
Expand Down
2 changes: 1 addition & 1 deletion packages/dioxus-blitz/src/documents/dioxus_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ impl<'a> MutationWriter<'a> {
}
}

impl<'a> Drop for MutationWriter<'a> {
impl Drop for MutationWriter<'_> {
fn drop(&mut self) {
// Add/Update inline stylesheets (<style> elements)
for &id in &self.style_nodes {
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/src/htmlsink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct DocumentHtmlParser<'a> {
pub net_provider: SharedProvider<Resource>,
}

impl<'a> DocumentHtmlParser<'a> {
impl DocumentHtmlParser<'_> {
pub fn new(doc: &mut Document, net_provider: SharedProvider<Resource>) -> DocumentHtmlParser {
DocumentHtmlParser {
doc: RefCell::new(doc),
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/src/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ impl<'a> RefCellChildIter<'a> {
}
}

impl<'a> Iterator for RefCellChildIter<'a> {
impl Iterator for RefCellChildIter<'_> {
type Item = NodeId;
fn next(&mut self) -> Option<Self::Item> {
self.items.get(self.idx).map(|id| {
Expand Down
7 changes: 3 additions & 4 deletions packages/dom/src/stylo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl<'a> TDocument for BlitzNode<'a> {
}
}

impl<'a> NodeInfo for BlitzNode<'a> {
impl NodeInfo for BlitzNode<'_> {
fn is_element(&self) -> bool {
Node::is_element(self)
}
Expand Down Expand Up @@ -278,7 +278,7 @@ impl<'a> TNode for BlitzNode<'a> {
}
}

impl<'a> selectors::Element for BlitzNode<'a> {
impl selectors::Element for BlitzNode<'_> {
type Impl = SelectorImpl;

fn opaque(&self) -> selectors::OpaqueElement {
Expand Down Expand Up @@ -990,10 +990,9 @@ impl<'a> RecalcStyle<'a> {
}

#[allow(unsafe_code)]
impl<'a, 'dom, E> DomTraversal<E> for RecalcStyle<'a>
impl<E> DomTraversal<E> for RecalcStyle<'_>
where
E: TElement,
E::ConcreteNode: 'dom,
{
fn process_preorder<F: FnMut(E::ConcreteNode)>(
&self,
Expand Down

0 comments on commit 82d23ff

Please sign in to comment.