Skip to content

Commit cf16e2d

Browse files
committed
auto impl Display for FrameExclusion
Signed-off-by: Richard Chien <[email protected]>
1 parent 6f9da64 commit cf16e2d

File tree

1 file changed

+2
-11
lines changed
  • src/expr/core/src/window_function

1 file changed

+2
-11
lines changed

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

+2-11
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ impl FrameBound<usize> {
245245
}
246246
}
247247

248-
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default, EnumAsInner)]
248+
#[derive(Display, Debug, Copy, Clone, Eq, PartialEq, Hash, Default, EnumAsInner)]
249+
#[display("EXCLUDE {}", style = "TITLE CASE")]
249250
pub enum FrameExclusion {
250251
CurrentRow,
251252
// Group,
@@ -254,16 +255,6 @@ pub enum FrameExclusion {
254255
NoOthers,
255256
}
256257

257-
impl Display for FrameExclusion {
258-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
259-
match self {
260-
FrameExclusion::CurrentRow => write!(f, "EXCLUDE CURRENT ROW")?,
261-
FrameExclusion::NoOthers => write!(f, "EXCLUDE NO OTHERS")?,
262-
}
263-
Ok(())
264-
}
265-
}
266-
267258
impl FrameExclusion {
268259
pub fn from_protobuf(exclusion: PbExclusion) -> Result<Self> {
269260
let excl = match exclusion {

0 commit comments

Comments
 (0)