Skip to content

Commit

Permalink
Remove use of the todo macro in event handling and add a comment ab…
Browse files Browse the repository at this point in the history
…out it being a todo (#168)

Using the `todo` macro causes a panic when this event is encountered. Noop is preferable in this case as it does not crash the application. This is especially annoying on platforms where `Ime::Enabled` event is sent upon application start even when the user is using a keyboard layout that does not need an IME support. There was added a "TODO" comment that informs about this feature being missing. Most IDEs and code editors have support/plugins/extensions to work with this type of comments and this type of comment is already used widely across the codebase. As such, the information about this feature not being implemented is not lost.
  • Loading branch information
DavidHusicka authored Nov 30, 2024
1 parent 19c28be commit caedfc9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/dioxus-native/src/dioxus_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,9 @@ impl DocumentLike for DioxusDocument {
}
}
}
EventData::Ime(_) => todo!(),
EventData::Hover => todo!(),
// TODO: Implement IME and Hover events handling
EventData::Ime(_) => {}
EventData::Hover => {}
}

if !prevent_default {
Expand Down

0 comments on commit caedfc9

Please sign in to comment.