Skip to content

Commit

Permalink
Apply another clippy recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
white-axe committed Sep 17, 2023
1 parent afdd001 commit 6eddc6e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/tabs/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,16 +453,10 @@ impl tab::Tab for Tab {
// If dragging an event and the cursor is not hovering over the tile of
// a different event, move the dragged event's tile to the cursor
let adjusted_hover_tile = hover_tile + offset;
if map
.events
.iter()
.filter(|(_, e)| {
adjusted_hover_tile.x == e.x as f32
&& adjusted_hover_tile.y == e.y as f32
})
.next()
.is_none()
{
if !map.events.iter().any(|(_, e)| {
adjusted_hover_tile.x == e.x as f32
&& adjusted_hover_tile.y == e.y as f32
}) {
if let Some(selected_event) =
map.events.get_mut(selected_event_id)
{
Expand Down

0 comments on commit 6eddc6e

Please sign in to comment.