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

@ -169,15 +169,15 @@ mod rainbow {
}
}
use iced::Element;
use iced::widget::{center_x, center_y, column, scrollable};
use iced::{Element, Never};
use rainbow::rainbow;
pub fn main() -> iced::Result {
iced::run((), view)
}
fn view(_state: &()) -> Element<'_, ()> {
fn view(_state: &()) -> Element<'_, Never> {
let content = column![
rainbow(),
"In this example we draw a custom widget Rainbow, using \