diff options
author | 2024-04-01 21:36:08 +0200 | |
---|---|---|
committer | 2024-04-01 21:36:08 +0200 | |
commit | 1d83e59e8ab51d403baee0daa878644c6a37be3f (patch) | |
tree | d081c5d1de46209ef00e4bea7ddb303cc646c5fd /examples/websocket | |
parent | c30b4b0a1c9b191bcb65ae1732581b5c96b8bcfe (diff) | |
download | iced-1d83e59e8ab51d403baee0daa878644c6a37be3f.tar.gz iced-1d83e59e8ab51d403baee0daa878644c6a37be3f.tar.bz2 iced-1d83e59e8ab51d403baee0daa878644c6a37be3f.zip |
Specialize `widget::text` helper with custom `IntoContent` trait
Diffstat (limited to 'examples/websocket')
-rw-r--r-- | examples/websocket/src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/websocket/src/main.rs b/examples/websocket/src/main.rs index 460d9a08..ef450524 100644 --- a/examples/websocket/src/main.rs +++ b/examples/websocket/src/main.rs @@ -97,7 +97,11 @@ impl WebSocket { } else { scrollable( column( - self.messages.iter().cloned().map(text).map(Element::from), + self.messages + .iter() + .map(ToString::to_string) + .map(text) + .map(Element::from), ) .spacing(10), ) |