From 488cac714896002791f3c7b9a99181310c1d1b5c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 2 Apr 2024 09:29:16 +0200 Subject: Avoid extra text allocations in `websocket` example --- examples/websocket/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/websocket/src/main.rs') diff --git a/examples/websocket/src/main.rs b/examples/websocket/src/main.rs index 369ae820..b479fe89 100644 --- a/examples/websocket/src/main.rs +++ b/examples/websocket/src/main.rs @@ -2,7 +2,7 @@ mod echo; use iced::alignment::{self, Alignment}; use iced::widget::{ - button, column, container, row, scrollable, text, text_input, value, + button, column, container, row, scrollable, text, text_input, }; use iced::{color, Command, Element, Length, Subscription}; use once_cell::sync::Lazy; @@ -96,7 +96,7 @@ impl WebSocket { .into() } else { scrollable( - column(self.messages.iter().map(value).map(Element::from)) + column(self.messages.iter().map(text).map(Element::from)) .spacing(10), ) .id(MESSAGE_LOG.clone()) -- cgit