summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-21 02:01:42 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-21 02:01:42 +0100
commit800a73ddd7d4a2e0b1ed23ec565cbc6325b3b7f0 (patch)
treeb2eeb7537ffd49bfbdd24c1a9580870eca99caa6
parent0f9934b1a70cdadb9131b68b6dfb76083f014636 (diff)
downloadiced-800a73ddd7d4a2e0b1ed23ec565cbc6325b3b7f0.tar.gz
iced-800a73ddd7d4a2e0b1ed23ec565cbc6325b3b7f0.tar.bz2
iced-800a73ddd7d4a2e0b1ed23ec565cbc6325b3b7f0.zip
Use new `async ||` closure syntax :tada:
-rw-r--r--examples/download_progress/src/download.rs2
-rw-r--r--examples/gallery/src/civitai.rs2
-rw-r--r--examples/websocket/src/echo.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/download_progress/src/download.rs b/examples/download_progress/src/download.rs
index 95df5cbe..0c1a0d2e 100644
--- a/examples/download_progress/src/download.rs
+++ b/examples/download_progress/src/download.rs
@@ -4,7 +4,7 @@ use iced::task::{Straw, sipper};
use std::sync::Arc;
pub fn download(url: impl AsRef<str>) -> impl Straw<(), Progress, Error> {
- sipper(move |mut progress| async move {
+ sipper(async move |mut progress| {
let response = reqwest::get(url.as_ref()).await?;
let total = response.content_length().ok_or(Error::NoContentLength)?;
diff --git a/examples/gallery/src/civitai.rs b/examples/gallery/src/civitai.rs
index b529d619..1102acae 100644
--- a/examples/gallery/src/civitai.rs
+++ b/examples/gallery/src/civitai.rs
@@ -62,7 +62,7 @@ impl Image {
}
pub fn download(self, size: Size) -> impl Straw<Rgba, Blurhash, Error> {
- sipper(move |mut sender| async move {
+ sipper(async move |mut sender| {
let client = reqwest::Client::new();
if let Size::Thumbnail { width, height } = size {
diff --git a/examples/websocket/src/echo.rs b/examples/websocket/src/echo.rs
index 0f14af94..1116d1ea 100644
--- a/examples/websocket/src/echo.rs
+++ b/examples/websocket/src/echo.rs
@@ -12,7 +12,7 @@ use async_tungstenite::tungstenite;
use std::fmt;
pub fn connect() -> impl Sipper<Never, Event> {
- sipper(|mut output| async move {
+ sipper(async |mut output| {
loop {
const ECHO_SERVER: &str = "ws://127.0.0.1:3030";