summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-09-18 15:45:41 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-09-18 15:45:41 +0100
commitc12c5ac3bacd2460ff57c3b52be19c622709d7bf (patch)
treec23d437ce72b7b36bac2ddc0b990776a85686e7a
parent34407263079e8899651a6b20c7d3c127c47d6553 (diff)
downloadsubplot-c12c5ac3bacd2460ff57c3b52be19c622709d7bf.tar.gz
subplotlib: Upgrade to state 0.5
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--Cargo.lock45
-rw-r--r--subplotlib/Cargo.toml2
-rw-r--r--subplotlib/src/scenario.rs4
3 files changed, 46 insertions, 5 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 442518e..dac263c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -288,6 +288,19 @@ dependencies = [
]
[[package]]
+name = "generator"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1d9279ca822891c1a4dae06d185612cf8fc6acfe5dff37781b41297811b12ee"
+dependencies = [
+ "cc",
+ "libc",
+ "log",
+ "rustversion",
+ "winapi",
+]
+
+[[package]]
name = "generic-array"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -464,6 +477,19 @@ dependencies = [
]
[[package]]
+name = "loom"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2111607c723d7857e0d8299d5ce7a0bf4b844d3e44f8de136b13da513eaf8fc4"
+dependencies = [
+ "cfg-if",
+ "generator",
+ "scoped-tls",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
name = "maplit"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -841,6 +867,12 @@ dependencies = [
]
[[package]]
+name = "rustversion"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088"
+
+[[package]]
name = "ryu"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -856,6 +888,12 @@ dependencies = [
]
[[package]]
+name = "scoped-tls"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
+
+[[package]]
name = "scopeguard"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -959,9 +997,12 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
[[package]]
name = "state"
-version = "0.4.2"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3015a7d0a5fd5105c91c3710d42f9ccf0abfb287d62206484dcc67f9569a6483"
+checksum = "87cf4f5369e6d3044b5e365c9690f451516ac8f0954084622b49ea3fde2f6de5"
+dependencies = [
+ "loom",
+]
[[package]]
name = "strsim"
diff --git a/subplotlib/Cargo.toml b/subplotlib/Cargo.toml
index 07e00c1..95844b5 100644
--- a/subplotlib/Cargo.toml
+++ b/subplotlib/Cargo.toml
@@ -19,7 +19,7 @@ fehler = "1"
subplotlib-derive = { version="0.1", path = "../subplotlib-derive" }
lazy_static = "1"
base64 = "0.13"
-state = "0.4"
+state = "0.5"
tempfile = "3.1"
fs2 = "0.4"
chrono = "0.4"
diff --git a/subplotlib/src/scenario.rs b/subplotlib/src/scenario.rs
index cca7721..b239883 100644
--- a/subplotlib/src/scenario.rs
+++ b/subplotlib/src/scenario.rs
@@ -150,7 +150,7 @@ where
/// This container allows the running of code within a given scenario context.
pub struct ScenarioContext {
title: String,
- inner: Container,
+ inner: Container![],
hooks: RefCell<Vec<Box<dyn ScenarioContextHookKind>>>,
}
@@ -158,7 +158,7 @@ impl ScenarioContext {
fn new(title: &str) -> Self {
Self {
title: title.to_string(),
- inner: Container::new(),
+ inner: <Container![]>::new(),
hooks: RefCell::new(Vec::new()),
}
}