Skip to content

Commit

Permalink
Bump uhlc to 0.8.0 - changing formatting of Timestamps as Strings (#1218
Browse files Browse the repository at this point in the history
)

* Bump uhlc to 0.8.0

* Remove irrelevant tests in storages replication

* Convert Timestamps in some unit tests

* Make cargo fmt happy
  • Loading branch information
JEnoch authored Jul 5, 2024
1 parent bef94d1 commit 54d12e1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 403 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ tokio-rustls = { version = "0.26.0", default-features = false }
# tokio-vsock = see: io/zenoh-links/zenoh-link-vsock/Cargo.toml (workspaces does not support platform dependent dependencies)
thread-priority = "1.1.0"
typenum = "1.16.0"
uhlc = { version = "0.7.0", default-features = false } # Default features are disabled due to usage in no_std crates
uhlc = { version = "0.8.0", default-features = false } # Default features are disabled due to usage in no_std crates
unwrap-infallible = "0.1.5"
unzip-n = "0.1.2"
url = "2.3.1"
Expand Down
6 changes: 3 additions & 3 deletions plugins/zenoh-plugin-rest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct JSONSample {
key: String,
value: serde_json::Value,
encoding: String,
time: Option<String>,
timestamp: Option<String>,
}

pub fn base64_encode(data: &[u8]) -> String {
Expand Down Expand Up @@ -100,7 +100,7 @@ fn sample_to_json(sample: &Sample) -> JSONSample {
key: sample.key_expr().as_str().to_string(),
value: payload_to_json(sample.payload(), sample.encoding()),
encoding: sample.encoding().to_string(),
time: sample.timestamp().map(|ts| ts.to_string()),
timestamp: sample.timestamp().map(|ts| ts.to_string()),
}
}

Expand All @@ -111,7 +111,7 @@ fn result_to_json(sample: Result<&Sample, &ReplyError>) -> JSONSample {
key: "ERROR".into(),
value: payload_to_json(err.payload(), err.encoding()),
encoding: err.encoding().to_string(),
time: None,
timestamp: None,
},
}
}
Expand Down
Loading

0 comments on commit 54d12e1

Please sign in to comment.