summaryrefslogtreecommitdiffstats
path: root/examples/download_progress
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-02-21 19:21:10 +0100
committerLibravatar GitHub <noreply@github.com>2025-02-21 19:21:10 +0100
commitf1ed99cb47997e1d194a41e7cdf2846f8eb5f8fa (patch)
treeb2eeb7537ffd49bfbdd24c1a9580870eca99caa6 /examples/download_progress
parent81ca3d2a223d62fbb48b93dcea5409f6212605fa (diff)
parent800a73ddd7d4a2e0b1ed23ec565cbc6325b3b7f0 (diff)
downloadiced-f1ed99cb47997e1d194a41e7cdf2846f8eb5f8fa.tar.gz
iced-f1ed99cb47997e1d194a41e7cdf2846f8eb5f8fa.tar.bz2
iced-f1ed99cb47997e1d194a41e7cdf2846f8eb5f8fa.zip
Merge pull request #2809 from iced-rs/rust-2024
Update to Rust 2024
Diffstat (limited to 'examples/download_progress')
-rw-r--r--examples/download_progress/Cargo.toml2
-rw-r--r--examples/download_progress/src/download.rs4
-rw-r--r--examples/download_progress/src/main.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/download_progress/Cargo.toml b/examples/download_progress/Cargo.toml
index 8632c8b8..9c52b2bd 100644
--- a/examples/download_progress/Cargo.toml
+++ b/examples/download_progress/Cargo.toml
@@ -2,7 +2,7 @@
name = "download_progress"
version = "0.1.0"
authors = ["Songtronix <contact@songtronix.com>", "Folyd <lyshuhow@gmail.com>"]
-edition = "2021"
+edition = "2024"
publish = false
[dependencies]
diff --git a/examples/download_progress/src/download.rs b/examples/download_progress/src/download.rs
index 5b81f7a2..0c1a0d2e 100644
--- a/examples/download_progress/src/download.rs
+++ b/examples/download_progress/src/download.rs
@@ -1,10 +1,10 @@
use iced::futures::StreamExt;
-use iced::task::{sipper, Straw};
+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/download_progress/src/main.rs b/examples/download_progress/src/main.rs
index 8082eccd..0ba8a297 100644
--- a/examples/download_progress/src/main.rs
+++ b/examples/download_progress/src/main.rs
@@ -3,7 +3,7 @@ mod download;
use download::download;
use iced::task;
-use iced::widget::{button, center, column, progress_bar, text, Column};
+use iced::widget::{Column, button, center, column, progress_bar, text};
use iced::{Center, Element, Function, Right, Task};
pub fn main() -> iced::Result {