diff options
author | Alex Auvolat <alex@adnab.me> | 2023-01-26 16:46:40 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-01-26 16:46:40 +0100 |
commit | 590a0a84505c0bee8ddd8fcd8de6f340319da097 (patch) | |
tree | 14009c0feea6c27cdf36fe85a21dc22753da8653 /src/util | |
parent | dac254a6e7413498df0e3b626769c2d2be3a4cfb (diff) | |
parent | 611792ddcf86f0a728e22abaa6e172d3679d5ca6 (diff) | |
download | garage-590a0a84505c0bee8ddd8fcd8de6f340319da097.tar.gz garage-590a0a84505c0bee8ddd8fcd8de6f340319da097.zip |
Merge branch 'main' into k2v-watch-range-2
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Cargo.toml | 8 | ||||
-rw-r--r-- | src/util/data.rs | 4 | ||||
-rw-r--r-- | src/util/time.rs | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml index 1017b1ce..abeccbbd 100644 --- a/src/util/Cargo.toml +++ b/src/util/Cargo.toml @@ -18,7 +18,7 @@ garage_db = { version = "0.8.1", path = "../db" } arc-swap = "1.0" async-trait = "0.1" -blake2 = "0.9" +blake2 = "0.10" bytes = "1.0" digest = "0.10" err-derive = "0.3" @@ -27,7 +27,7 @@ hexdump = "0.1" xxhash-rust = { version = "0.8", default-features = false, features = ["xxh3"] } hex = "0.4" lazy_static = "1.4" -tracing = "0.1.30" +tracing = "0.1" rand = "0.8" sha2 = "0.10" @@ -35,7 +35,7 @@ chrono = "0.4" rmp-serde = "0.15" serde = { version = "1.0", default-features = false, features = ["derive", "rc"] } serde_json = "1.0" -toml = "0.5" +toml = "0.6" futures = "0.3" tokio = { version = "1.0", default-features = false, features = ["rt", "rt-multi-thread", "io-util", "net", "time", "macros", "sync", "signal", "fs"] } @@ -48,7 +48,7 @@ hyper = "0.14" opentelemetry = { version = "0.17", features = [ "rt-tokio", "metrics", "trace" ] } [dev-dependencies] -mktemp = "0.4" +mktemp = "0.5" [features] k2v = [] diff --git a/src/util/data.rs b/src/util/data.rs index 3f61e301..bdd8daee 100644 --- a/src/util/data.rs +++ b/src/util/data.rs @@ -115,9 +115,9 @@ pub fn sha256sum(data: &[u8]) -> Hash { /// Compute the blake2 of a slice pub fn blake2sum(data: &[u8]) -> Hash { - use blake2::{Blake2b, Digest}; + use blake2::{Blake2b512, Digest}; - let mut hasher = Blake2b::new(); + let mut hasher = Blake2b512::new(); hasher.update(data); let mut hash = [0u8; 32]; hash.copy_from_slice(&hasher.finalize()[..32]); diff --git a/src/util/time.rs b/src/util/time.rs index 257b4d2a..42f41a44 100644 --- a/src/util/time.rs +++ b/src/util/time.rs @@ -25,6 +25,6 @@ pub fn increment_logical_clock_2(prev: u64, prev2: u64) -> u64 { pub fn msec_to_rfc3339(msecs: u64) -> String { let secs = msecs as i64 / 1000; let nanos = (msecs as i64 % 1000) as u32 * 1_000_000; - let timestamp = Utc.timestamp(secs, nanos); + let timestamp = Utc.timestamp_opt(secs, nanos).unwrap(); timestamp.to_rfc3339_opts(SecondsFormat::Millis, true) } |