Skip to content

Commit 0e1027c

Browse files
authored
fix clippy warnings (apache#367)
1 parent 9c87d3b commit 0e1027c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ast/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,15 +433,14 @@ impl fmt::Display for WindowSpec {
433433
write!(f, "ORDER BY {}", display_comma_separated(&self.order_by))?;
434434
}
435435
if let Some(window_frame) = &self.window_frame {
436+
f.write_str(delim)?;
436437
if let Some(end_bound) = &window_frame.end_bound {
437-
f.write_str(delim)?;
438438
write!(
439439
f,
440440
"{} BETWEEN {} AND {}",
441441
window_frame.units, window_frame.start_bound, end_bound
442442
)?;
443443
} else {
444-
f.write_str(delim)?;
445444
write!(f, "{} {}", window_frame.units, window_frame.start_bound)?;
446445
}
447446
}

src/parser.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,6 +2772,7 @@ impl<'a> Parser<'a> {
27722772
// followed by some joins or (B) another level of nesting.
27732773
let mut table_and_joins = self.parse_table_and_joins()?;
27742774

2775+
#[allow(clippy::if_same_then_else)]
27752776
if !table_and_joins.joins.is_empty() {
27762777
self.expect_token(&Token::RParen)?;
27772778
Ok(TableFactor::NestedJoin(Box::new(table_and_joins))) // (A)

0 commit comments

Comments
 (0)