From 16cc4cdb2c96ceba7e3286e9859d6405b49db633 Mon Sep 17 00:00:00 2001 From: Carter Green Date: Wed, 10 Apr 2024 11:17:34 -0500 Subject: [PATCH] MOD: Update for `BorrowedFormatItem` rename --- Cargo.lock | 8 ++++---- rust/dbn/Cargo.toml | 2 +- rust/dbn/src/metadata.rs | 2 +- rust/dbn/src/pretty.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 824b84a..1ba35ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1159,9 +1159,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "ef89ece63debf11bc32d1ed8d078ac870cbeb44da02afb02a9ff135ae7ca0582" dependencies = [ "deranged", "itoa", @@ -1180,9 +1180,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", diff --git a/rust/dbn/Cargo.toml b/rust/dbn/Cargo.toml index 1fcc364..de6a17a 100644 --- a/rust/dbn/Cargo.toml +++ b/rust/dbn/Cargo.toml @@ -48,7 +48,7 @@ strum = { version = "0.26", features = ["derive"], optional = true } # Custom error helper thiserror = "1.0" # date and datetime support -time = { version = "0.3", features = ["formatting", "macros"] } +time = { version = ">=0.3.35", features = ["formatting", "macros"] } # async traits tokio = { version = "1", features = ["fs", "io-util"], optional = true } # (de)compression diff --git a/rust/dbn/src/metadata.rs b/rust/dbn/src/metadata.rs index 29b6964..959d327 100644 --- a/rust/dbn/src/metadata.rs +++ b/rust/dbn/src/metadata.rs @@ -398,7 +398,7 @@ pub struct MappingInterval { } /// The date format used for date strings when serializing [`Metadata`]. -pub const DATE_FORMAT: &[time::format_description::FormatItem<'static>] = +pub const DATE_FORMAT: &[time::format_description::BorrowedFormatItem<'static>] = time::macros::format_description!("[year]-[month]-[day]"); #[cfg(feature = "serde")] diff --git a/rust/dbn/src/pretty.rs b/rust/dbn/src/pretty.rs index a21ec70..de2f73e 100644 --- a/rust/dbn/src/pretty.rs +++ b/rust/dbn/src/pretty.rs @@ -3,7 +3,7 @@ use std::fmt; -use time::format_description::FormatItem; +use time::format_description::BorrowedFormatItem; use crate::FIXED_PRICE_SCALE; @@ -68,7 +68,7 @@ pub fn fmt_px(px: i64) -> String { /// Converts a nanosecond UNIX timestamp to a human-readable string in the format /// `[year]-[month]-[day]T[hour]:[minute]:[second].[subsecond digits:9]Z`. pub fn fmt_ts(ts: u64) -> String { - const TS_FORMAT: &[FormatItem<'static>] = time::macros::format_description!( + const TS_FORMAT: &[BorrowedFormatItem<'static>] = time::macros::format_description!( "[year]-[month]-[day]T[hour]:[minute]:[second].[subsecond digits:9]Z" ); if ts == 0 {