Fix Message type to Never in UpdateFn for ()

This commit is contained in:
Héctor Ramón Jiménez 2025-12-07 01:42:42 +01:00
parent 92d08bcc10
commit 31fcaccf7d
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 11 additions and 9 deletions

View file

@ -85,13 +85,14 @@ pub use widget::Widget;
pub use bytes::Bytes;
pub use smol_str::SmolStr;
pub use std::convert::Infallible as Never;
/// A function that can _never_ be called.
///
/// This is useful to turn generic types into anything
/// you want by coercing them into a type with no possible
/// values.
pub fn never<T>(never: std::convert::Infallible) -> T {
pub fn never<T>(never: Never) -> T {
match never {}
}