Skip to content

Commit 8ea341d

Browse files
.
1 parent 9cd2763 commit 8ea341d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/types.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Types for Basin configuration that directly map to s2::types.
22
3-
use clap::{Parser, ValueEnum};
3+
use clap::{Args, Parser, ValueEnum};
44
use s2::types::BasinName;
55
use serde::Serialize;
66
use std::{str::FromStr, time::Duration};
@@ -136,7 +136,7 @@ pub struct StreamConfig {
136136
#[clap(flatten)]
137137
/// Timestamping configuration.
138138
pub timestamping: Option<TimestampingConfig>,
139-
#[arg(long, help("Example: 1d, 1w, 1y"))]
139+
#[clap(flatten)]
140140
/// Delete-on-empty configuration.
141141
pub delete_on_empty: Option<DeleteOnEmptyConfig>,
142142
}
@@ -181,8 +181,9 @@ impl From<&str> for RetentionPolicy {
181181
}
182182
}
183183
}
184-
#[derive(Clone, Debug, Serialize)]
184+
#[derive(Args, Clone, Debug, Serialize)]
185185
pub struct DeleteOnEmptyConfig {
186+
#[arg(long, value_parser = humantime::parse_duration)]
186187
pub delete_on_empty_min_age: Duration,
187188
}
188189

0 commit comments

Comments
 (0)