From 24cf355e96d8ae6432ca8972214c2c4f31d07b22 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 4 Feb 2025 19:07:24 +0100 Subject: Fix documentation of `markdown` and `rich_text` --- core/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/src') diff --git a/core/src/lib.rs b/core/src/lib.rs index c31a8da7..d5c221ac 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -84,3 +84,12 @@ pub use vector::Vector; pub use widget::Widget; pub use smol_str::SmolStr; + +/// 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(never: std::convert::Infallible) -> T { + match never {} +} -- cgit