Skip to content

Commit

Permalink
chore: run fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Oct 31, 2023
1 parent 26fcb54 commit cc77ee4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/core/src/events_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl EventsProcessor {
// All these events will mark the node as being hovered
// "mouseover" "mouseenter" "pointerover" "pointerenter"

// We clone this here so events emitted in the same batch that mark an element as hovered will not affect the other events
// We clone this here so events emitted in the same batch that mark an element as hovered will not affect the other events
let hovered_elements = self.hovered_elements.clone();

// Emit valid events
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn process_layers(
let text_group = layers
.paragraph_elements
.entry(cursor_ref.text_id)
.or_insert_with(Vec::default);
.or_default();

text_group.push(node.id());
}
Expand Down
2 changes: 1 addition & 1 deletion crates/layout/src/layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Layers {

/// Insert a Node into a layer
pub fn add_element(&mut self, node_id: NodeId, node_layer: i16) {
let layer = self.layers.entry(node_layer).or_insert_with(Vec::default);
let layer = self.layers.entry(node_layer).or_default();

layer.push(node_id);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/torin/src/measure_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ impl<'a> MeasureMode<'a> {
},
MeasureMode::ParentIsNotCached { area, inner_area } => {
OwnedMeasureMode::ParentIsNotCached {
area: **area.clone(),
inner_area: **inner_area.clone(),
area: **area,
inner_area: **inner_area,
}
}
}
Expand Down

0 comments on commit cc77ee4

Please sign in to comment.