summaryrefslogtreecommitdiffstats
path: root/examples/download_progress/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-23 20:37:30 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-23 20:37:30 +0100
commitb92e1f957408e3254e5fe0da389808474de6c4a9 (patch)
treecc33a8f1682c0876d9fefc7cadc160c1073ed33b /examples/download_progress/src/main.rs
parent30c7db3f25d12461f2dec493f92c3f3282bd264d (diff)
downloadiced-b92e1f957408e3254e5fe0da389808474de6c4a9.tar.gz
iced-b92e1f957408e3254e5fe0da389808474de6c4a9.tar.bz2
iced-b92e1f957408e3254e5fe0da389808474de6c4a9.zip
Rename `downloader` module to `download`
Diffstat (limited to 'examples/download_progress/src/main.rs')
-rw-r--r--examples/download_progress/src/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/download_progress/src/main.rs b/examples/download_progress/src/main.rs
index 75e3bee0..f3da3d7b 100644
--- a/examples/download_progress/src/main.rs
+++ b/examples/download_progress/src/main.rs
@@ -3,7 +3,7 @@ use iced::{
Element, Length, ProgressBar, Settings, Subscription, Text,
};
-mod downloader;
+mod download;
pub fn main() {
Example::run(Settings::default())
@@ -18,7 +18,7 @@ enum Example {
#[derive(Debug, Clone)]
pub enum Message {
- DownloadProgressed(downloader::Progress),
+ DownloadProgressed(download::Progress),
Download,
}
@@ -49,13 +49,13 @@ impl Application for Example {
},
Message::DownloadProgressed(message) => match self {
Example::Downloading { progress } => match message {
- downloader::Progress::Started => {
+ download::Progress::Started => {
*progress = 0.0;
}
- downloader::Progress::Advanced(percentage) => {
+ download::Progress::Advanced(percentage) => {
*progress = percentage;
}
- downloader::Progress::Finished => {
+ download::Progress::Finished => {
*self = Example::Finished {
button: button::State::new(),
}
@@ -71,7 +71,7 @@ impl Application for Example {
fn subscription(&self) -> Subscription<Message> {
match self {
Example::Downloading { .. } => {
- downloader::file("https://speed.hetzner.de/100MB.bin")
+ download::file("https://speed.hetzner.de/100MB.bin")
.map(Message::DownloadProgressed)
}
_ => Subscription::none(),