Skip to content

Commit

Permalink
chore(deps): bump chrono, serde, serde_json, derive_builder, rust_dec…
Browse files Browse the repository at this point in the history
…imal_macros
  • Loading branch information
thevaibhav-dixit committed Mar 11, 2024
1 parent ae85b3e commit b66f1dd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 54 deletions.
61 changes: 15 additions & 46 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ tokio-tungstenite = { version = "0.20.1", features = ["rustls-tls-webpki-roots"]
url = { version = "2.5.0", features = ["serde"] }
axum = "0.6.11"
axum-core = "0.3.4"
serde = { version = "1.0.196", features = ["derive"] }
serde_json = "1.0.113"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.114"
serde_yaml = "0.9.31"
serde_with = { version = "3.6.1", features = ["chrono_0_4"] }
sqlx = { version = "0.7.2", features = [ "runtime-tokio-rustls", "postgres", "rust_decimal", "uuid", "chrono", "json" ] }
Expand All @@ -39,12 +39,12 @@ opentelemetry-otlp = { version = "0.15.0", features = ["http-proto", "reqwest-cl
opentelemetry = { version = "0.22.0" }
opentelemetry_sdk = { version = "0.22.1", features = ["rt-tokio"] }
opentelemetry-http = "0.11.0"
chrono = { version = "0.4", features = ["clock", "serde"], default-features = false }
chrono = { version = "0.4.35", features = ["clock", "serde"], default-features = false }
ring = "0.16.20"
uuid = { version = "1.7.0", features = ["v4", "serde"] }
data-encoding = "2.5.0"
rust_decimal = "1.34.3"
rust_decimal_macros = "1.29.0"
rust_decimal_macros = "1.34.2"
governor = "0.5.1"
lazy_static = "1.4.0"
rand = "0.8.5"
Expand All @@ -56,4 +56,4 @@ prost = "0.12.1"
prost-wkt-types = { version = "0.5.0", features = ["vendored-protoc"]}
graphql_client = {version = "0.12.0", features = ["reqwest"]}
rusty-money = "0.4.1"
derive_builder = "0.12.0"
derive_builder = "0.20.0"
2 changes: 1 addition & 1 deletion hedging/src/okex/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,5 @@ fn default_high_bound_buffer_percentage() -> Decimal {
dec!(0.9)
}
fn default_deposit_lost_timeout_seconds() -> chrono::Duration {
chrono::Duration::seconds(3600)
chrono::Duration::try_seconds(3600).expect("should always be able to create a timeout duration")
}
3 changes: 1 addition & 2 deletions shared/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ impl TryFrom<&TimeStampMilliStr> for TimeStamp {

fn try_from(value: &TimeStampMilliStr) -> Result<Self, Self::Error> {
let millis = value.0.parse::<i64>()?;
if let Some(naive) = NaiveDateTime::from_timestamp_opt(millis / 1000, 0) {
let datetime: DateTime<Utc> = DateTime::from_naive_utc_and_offset(naive, Utc);
if let Some(datetime) = DateTime::from_timestamp(millis / 1000, 0) {
Ok(Self(datetime))
} else {
Err(TimeStampError::EmptyNaiveDateTime(
Expand Down

0 comments on commit b66f1dd

Please sign in to comment.