Skip to content

Commit

Permalink
doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjinwu committed Mar 9, 2023
1 parent a445d26 commit fb8de6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/common/src/types/interval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ impl IntervalUnit {
}
}

/// Wrapper so that `Debug for IntervalUnitDisplay` would use the concise format of `Display for
/// IntervalUnit`.
#[derive(Clone, Copy)]
pub struct IntervalUnitDisplay<'a> {
pub core: &'a IntervalUnit,
Expand All @@ -452,6 +454,8 @@ impl std::fmt::Debug for IntervalUnitDisplay<'_> {
}
}

/// Loss of information during the process due to `justify`. Only intended for memcomparable
/// encoding.
impl Serialize for IntervalUnit {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
Expand All @@ -473,6 +477,7 @@ impl<'de> Deserialize<'de> for IntervalUnit {
}
}

/// Duplicated logic only used by `HopWindow`. See #8452.
#[expect(clippy::from_over_into)]
impl Into<IntervalUnitProto> for IntervalUnit {
fn into(self) -> IntervalUnitProto {
Expand Down

0 comments on commit fb8de6a

Please sign in to comment.