summaryrefslogtreecommitdiffstats
path: root/examples/pokedex
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-10 00:34:21 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-10 00:34:21 +0200
commitb8e5693a3089d728b4f8d4b3b0b7197202ebd732 (patch)
tree79a9f84f9920525657fbe03d53ce33bab09053d7 /examples/pokedex
parent956512338905bac0b156fdaf16fe3c3e07e97a84 (diff)
parenta3489e4af960388e9f73988b88df361022a654a4 (diff)
downloadiced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.tar.gz
iced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.tar.bz2
iced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.zip
Merge branch 'master' into explicit-text-caching
Diffstat (limited to '')
-rw-r--r--examples/pokedex/Cargo.toml11
-rw-r--r--examples/pokedex/README.md4
-rw-r--r--examples/pokedex/src/main.rs2
3 files changed, 10 insertions, 7 deletions
diff --git a/examples/pokedex/Cargo.toml b/examples/pokedex/Cargo.toml
index e99fc0c3..bf7e1e35 100644
--- a/examples/pokedex/Cargo.toml
+++ b/examples/pokedex/Cargo.toml
@@ -6,7 +6,9 @@ edition = "2021"
publish = false
[dependencies]
-iced = { path = "../..", features = ["image", "debug", "tokio"] }
+iced.workspace = true
+iced.features = ["image", "debug", "tokio"]
+
serde_json = "1.0"
[dependencies.serde]
@@ -19,5 +21,8 @@ default-features = false
features = ["json", "rustls-tls"]
[dependencies.rand]
-version = "0.7"
-features = ["wasm-bindgen"]
+version = "0.8"
+
+[dependencies.getrandom]
+version = "0.2"
+features = ["js"]
diff --git a/examples/pokedex/README.md b/examples/pokedex/README.md
index 50720f57..8e8562ac 100644
--- a/examples/pokedex/README.md
+++ b/examples/pokedex/README.md
@@ -4,9 +4,7 @@ An application that loads a random Pokédex entry using the [PokéAPI].
All the example code can be found in the __[`main`](src/main.rs)__ file.
<div align="center">
- <a href="https://gfycat.com/aggressivedarkelephantseal-rust-gui">
- <img src="https://thumbs.gfycat.com/AggressiveDarkElephantseal-small.gif" height="400px">
- </a>
+ <img src="https://iced.rs/examples/pokedex.gif">
</div>
You can run it on native platforms with `cargo run`:
diff --git a/examples/pokedex/src/main.rs b/examples/pokedex/src/main.rs
index 4482814c..8b71a269 100644
--- a/examples/pokedex/src/main.rs
+++ b/examples/pokedex/src/main.rs
@@ -153,7 +153,7 @@ impl Pokemon {
let id = {
let mut rng = rand::rngs::OsRng;
- rng.gen_range(0, Pokemon::TOTAL)
+ rng.gen_range(0..Pokemon::TOTAL)
};
let fetch_entry = async {