Skip to content

Commit 222f08d

Browse files
GyulyVGCJoylei
authored andcommitted
migration to iced 0.9
1 parent 77ac1d0 commit 222f08d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
target/*
22
Cargo.lock
33
.cargo/*
4-
examples/split-chart/dist/*
4+
examples/split-chart/dist/*
5+
.idea

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "plotters-iced"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
description = "Iced backend for Plotters"
55
readme = "README.md"
66
license = "MIT"
@@ -19,8 +19,8 @@ members = [".", "examples/split-chart"]
1919
[dependencies]
2020
plotters = { version = "0.3", default_features = false }
2121
plotters-backend = "0.3"
22-
iced_native = "0.9"
23-
iced_graphics = { version = "0.7", features = ["canvas"] }
22+
iced_native = "0.10"
23+
iced_graphics = { version = "0.8", features = ["canvas"] }
2424

2525
[dev-dependencies]
2626
plotters = { version = "0.3", default_features = false, features = [
@@ -29,7 +29,7 @@ plotters = { version = "0.3", default_features = false, features = [
2929
"line_series",
3030
"point_series",
3131
] }
32-
iced = { version = "0.8", features = ["canvas", "tokio"] }
32+
iced = { version = "0.9", features = ["canvas", "tokio"] }
3333
chrono = { version = "0.4", default-features = false }
3434
rand = "0.8"
3535
tokio = { version = "1", features = ["rt"], default-features = false }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Include `plotters-iced` in your `Cargo.toml` dependencies:
3030

3131
```toml
3232
[dependencies]
33-
plotters-iced = "0.6"
34-
iced = { version = "0.7", features = ["canvas", "tokio"] }
33+
plotters-iced = "0.8"
34+
iced = { version = "0.9", features = ["canvas", "tokio"] }
3535
plotters="0.3"
3636
```
3737

src/sample/lttb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ where
179179
let avg_range_length = (avg_range_end - avg_range_start) as f64;
180180

181181
for i in 0..(avg_range_end - avg_range_start) {
182-
let idx = (avg_range_start + i) as usize;
182+
let idx = avg_range_start + i;
183183
let item = self.source.item_at(idx);
184184
avg_x += item.x();
185185
avg_y += item.y();
@@ -199,7 +199,7 @@ where
199199
let mut max_area = -1f64;
200200
let mut next_a = range_offs;
201201
for i in 0..(range_to - range_offs) {
202-
let idx = (range_offs + i) as usize;
202+
let idx = range_offs + i;
203203

204204
// Calculate triangle area over three buckets.
205205
let item = self.source.item_at(idx);

0 commit comments

Comments
 (0)