Skip to content

Commit 88c27c1

Browse files
committed
auto impl Display for FrameBounds
Signed-off-by: Richard Chien <[email protected]>
1 parent cae4e24 commit 88c27c1

File tree

1 file changed

+8
-15
lines changed
  • src/expr/core/src/window_function

1 file changed

+8
-15
lines changed

src/expr/core/src/window_function/call.rs

+8-15
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ impl Frame {
111111
}
112112
}
113113

114+
#[derive(Display, Debug, Clone, Eq, PartialEq, Hash)]
115+
#[display("{0}")]
116+
pub enum FrameBounds {
117+
Rows(RowsFrameBounds),
118+
// Groups(GroupsFrameBounds),
119+
// Range(RangeFrameBounds),
120+
}
121+
114122
impl FrameBounds {
115123
pub fn validate(&self) -> Result<()> {
116124
match self {
@@ -135,21 +143,6 @@ impl FrameBounds {
135143
}
136144
}
137145

138-
impl Display for FrameBounds {
139-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
140-
match self {
141-
Self::Rows(bounds) => bounds.fmt(f),
142-
}
143-
}
144-
}
145-
146-
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
147-
pub enum FrameBounds {
148-
Rows(RowsFrameBounds),
149-
// Groups(GroupsFrameBounds),
150-
// Range(RangeFrameBounds),
151-
}
152-
153146
#[derive(Display, Debug, Clone, Eq, PartialEq, Hash)]
154147
#[display("ROWS BETWEEN {start} AND {end}")]
155148
pub struct RowsFrameBounds {

0 commit comments

Comments
 (0)