Skip to content

Commit 04fff4f

Browse files
Do not require end bound on triage API
1 parent 375af64 commit 04fff4f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

collector/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ pub struct DeltaTime(#[serde(with = "round_float")] pub f64);
2323
/// In the case of commits or tags this is an exact bound, but for dates
2424
/// it's a best effort (i.e., if the bound is a date but there are no artifacts
2525
/// for that date, we'll find the artifact that most closely matches).
26-
#[derive(Debug, Clone, PartialEq, Eq)]
26+
#[derive(Default, Debug, Clone, PartialEq, Eq)]
2727
pub enum Bound {
2828
/// An unverified git commit (in sha form) or a tag of a commit (e.g., "1.53.0")
2929
Commit(String),
3030
/// A date in time
3131
Date(NaiveDate),
3232
/// No bound
33+
#[default]
3334
None,
3435
}
3536

site/src/api.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ pub mod triage {
448448
#[derive(Debug, Clone, Serialize, Deserialize)]
449449
pub struct Request {
450450
pub start: Bound,
451+
#[serde(default)]
451452
pub end: Bound,
452453
}
453454

0 commit comments

Comments
 (0)