summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@ifm.com>2022-07-26 10:57:48 +0200
committerMatthias Beyer <matthias.beyer@ifm.com>2022-07-26 10:57:52 +0200
commit22815713097a3ccded00355076a7d710572d3187 (patch)
tree6cd66afb83488c82b1da73a34efbc8bbbb03c803
parentd1dd2ae02ab5c0d6af0af52b0a306d8ce6d220e2 (diff)
Replace clock serde functionality with time serde functionality
The serde module from the "clock" crate was only a reexport of the serde module of the "time" crate, so we can simply use the latter here. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r--crates/core/thin_edge_json/Cargo.toml4
-rw-r--r--crates/core/thin_edge_json/src/alarm.rs2
-rw-r--r--crates/core/thin_edge_json/src/event.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/crates/core/thin_edge_json/Cargo.toml b/crates/core/thin_edge_json/Cargo.toml
index df8f8acc..77602b38 100644
--- a/crates/core/thin_edge_json/Cargo.toml
+++ b/crates/core/thin_edge_json/Cargo.toml
@@ -8,12 +8,12 @@ rust-version = "1.58.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-clock = { path = "../../common/clock", features = ["with-serde"] }
+clock = { path = "../../common/clock" }
json-writer = { path = "../../common/json_writer" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
thiserror = "1.0"
-time = { version = "0.3", features = ["formatting", "local-offset", "parsing", "serde"] }
+time = { version = "0.3", features = ["formatting", "local-offset", "parsing", "serde", "serde-well-known"] }
[dev-dependencies]
anyhow = "1.0"
diff --git a/crates/core/thin_edge_json/src/alarm.rs b/crates/core/thin_edge_json/src/alarm.rs
index 91167108..9029d673 100644
--- a/crates/core/thin_edge_json/src/alarm.rs
+++ b/crates/core/thin_edge_json/src/alarm.rs
@@ -25,7 +25,7 @@ pub struct ThinEdgeAlarmData {
pub text: Option<String>,
#[serde(default)]
- #[serde(with = "clock::serde::rfc3339::option")]
+ #[serde(with = "time::serde::rfc3339::option")]
pub time: Option<Timestamp>,
}
diff --git a/crates/core/thin_edge_json/src/event.rs b/crates/core/thin_edge_json/src/event.rs
index 8e07625f..20052f0e 100644
--- a/crates/core/thin_edge_json/src/event.rs
+++ b/crates/core/thin_edge_json/src/event.rs
@@ -22,7 +22,7 @@ pub struct ThinEdgeEventData {
pub text: Option<String>,
#[serde(default)]
- #[serde(with = "clock::serde::rfc3339::option")]
+ #[serde(with = "time::serde::rfc3339::option")]
pub time: Option<Timestamp>,
#[serde(flatten)]