From 70e8ce59c4e50906bcd2694b20e02547285e50b5 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Tue, 11 Jul 2023 18:17:09 +0300 Subject: [PATCH] Change `stream::Config::duplicate_window` to `Duration` --- async-nats/src/jetstream/stream.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/async-nats/src/jetstream/stream.rs b/async-nats/src/jetstream/stream.rs index b4858c2ab..a07ad7d0b 100644 --- a/async-nats/src/jetstream/stream.rs +++ b/async-nats/src/jetstream/stream.rs @@ -1018,8 +1018,8 @@ pub struct Config { #[serde(default, skip_serializing_if = "is_default")] pub no_ack: bool, /// The window within which to track duplicate messages. - #[serde(default, skip_serializing_if = "is_default")] - pub duplicate_window: i64, + #[serde(default, skip_serializing_if = "is_default", with = "serde_nanos")] + pub duplicate_window: Duration, /// The owner of the template associated with this stream. #[serde(default, skip_serializing_if = "is_default")] pub template_owner: String,