Skip to content

Commit 5af7041

Browse files
committed
expose once_cell version through cargo feature
1 parent ca025e2 commit 5af7041

File tree

12 files changed

+24
-34
lines changed

12 files changed

+24
-34
lines changed

Cargo.lock

Lines changed: 6 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ categories = ["gui"]
1313
[features]
1414
default = ["iced", "iced_native", "iced_futures", "iced_core", "iced_style"]
1515
libcosmic = ["dep:libcosmic"]
16+
once_cell = ["dep:once_cell"]
1617

1718
[workspace]
1819
members = [
@@ -26,3 +27,4 @@ iced_futures = { version = "0.6.0", optional = true }
2627
iced_core = { version = "0.9.0", optional = true }
2728
iced_style = { version = "0.8.0", optional = true }
2829
libcosmic = { git = "https://github.com/pop-os/libcosmic/", rev = "5765053", default-features = false, features = [ "tokio" ], optional = true }
30+
once_cell = { version = "1.18.0", optional = true }

examples/counter/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ publish = false
77

88
[dependencies]
99
iced = "0.9.0"
10-
cosmic-time = { path = "../.."}
11-
once_cell = "1.15"
10+
cosmic-time = { path = "../..", features = ["once_cell"] }

examples/counter/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ use iced::{
55
Alignment, Application, Command, Element, Event, Length, Settings, Subscription, Theme,
66
};
77

8-
use cosmic_time::{self, anim, chain, id, Timeline};
9-
10-
use once_cell::sync::Lazy;
8+
use cosmic_time::{self, anim, chain, id, once_cell::sync::Lazy, Timeline};
119

1210
static CONTAINER: Lazy<id::Container> = Lazy::new(id::Container::unique);
1311

examples/pokedex/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ publish = false
77

88
[dependencies]
99
iced = { version = "0.9.0", features = ["image", "debug", "tokio"] }
10-
cosmic-time = { path = "../.." }
11-
once_cell = "1.15"
10+
cosmic-time = { path = "../..", features = ["once_cell"] }
1211
serde_json = "1.0"
1312

1413
[dependencies.serde]

examples/pokedex/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ use iced::{
66
};
77

88
use cosmic_time::{
9-
self, anim, chain, id, Back, Bounce, Circular, Ease, Elastic, Exponential, Linear, Quadratic,
10-
Quartic, Quintic, Sinusoidal, Timeline,
9+
self, anim, chain, id, once_cell::sync::Lazy, Back, Bounce, Circular, Ease, Elastic,
10+
Exponential, Linear, Quadratic, Quartic, Quintic, Sinusoidal, Timeline,
1111
};
12-
use once_cell::sync::Lazy;
1312

1413
static SPACE: Lazy<id::Space> = Lazy::new(id::Space::unique);
1514

examples/pong/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ publish = false
88
[dependencies]
99
iced = "0.9.0"
1010
iced_native = "0.10.1"
11-
cosmic-time = { path = "../.."}
12-
once_cell = "1.17"
11+
cosmic-time = { path = "../..", features = ["once_cell"] }
1312
rand = "0.8.5"

examples/pong/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ use iced::widget::{column, container, row, Space};
55
use iced::{executor, Application, Command, Event, Length, Settings, Subscription};
66
use iced_native::window;
77

8-
use cosmic_time::{self, anim, chain, id, Duration, Instant, Speed, Timeline};
8+
use cosmic_time::{
9+
self, anim, chain, id, once_cell::sync::Lazy, Duration, Instant, Speed, Timeline,
10+
};
911

10-
use once_cell::sync::Lazy;
1112
use rand::prelude::*;
1213

1314
mod layer;

examples/stopwatch/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ publish = false
77

88
[dependencies]
99
iced = { version = "0.9.0", features = ["smol"] }
10-
cosmic-time = { path = "../.."}
11-
once_cell = "1.15"
10+
cosmic-time = { path = "../..", features = ["once_cell"] }
1211

examples/stopwatch/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ mod theme;
77
use self::widget::Element;
88
use theme::Theme;
99

10-
use cosmic_time::{self, anim, chain, id, Sinusoidal, Timeline};
11-
use once_cell::sync::Lazy;
10+
use cosmic_time::{self, anim, chain, id, once_cell::sync::Lazy, Sinusoidal, Timeline};
1211

1312
static BUTTON: Lazy<id::StyleButton> = Lazy::new(id::StyleButton::unique);
1413
static CONTAINER: Lazy<id::StyleContainer> = Lazy::new(id::StyleContainer::unique);

0 commit comments

Comments
 (0)