mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 15:04:04 +00:00
fix clippy warnings (#367)
This commit is contained in:
parent
9c87d3b195
commit
0e1027ce96
2 changed files with 2 additions and 2 deletions
|
@ -433,15 +433,14 @@ impl fmt::Display for WindowSpec {
|
|||
write!(f, "ORDER BY {}", display_comma_separated(&self.order_by))?;
|
||||
}
|
||||
if let Some(window_frame) = &self.window_frame {
|
||||
f.write_str(delim)?;
|
||||
if let Some(end_bound) = &window_frame.end_bound {
|
||||
f.write_str(delim)?;
|
||||
write!(
|
||||
f,
|
||||
"{} BETWEEN {} AND {}",
|
||||
window_frame.units, window_frame.start_bound, end_bound
|
||||
)?;
|
||||
} else {
|
||||
f.write_str(delim)?;
|
||||
write!(f, "{} {}", window_frame.units, window_frame.start_bound)?;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2772,6 +2772,7 @@ impl<'a> Parser<'a> {
|
|||
// followed by some joins or (B) another level of nesting.
|
||||
let mut table_and_joins = self.parse_table_and_joins()?;
|
||||
|
||||
#[allow(clippy::if_same_then_else)]
|
||||
if !table_and_joins.joins.is_empty() {
|
||||
self.expect_token(&Token::RParen)?;
|
||||
Ok(TableFactor::NestedJoin(Box::new(table_and_joins))) // (A)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue