Skip to content

Commit

Permalink
use empty_results
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Nov 9, 2023
1 parent 1807e6d commit 00a8f98
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sqllogictest/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ pub enum QueryExpect<T: ColumnType> {
Error(ExpectedError),
}

#[cfg(test)]
impl<T: ColumnType> QueryExpect<T> {
/// Creates a new [`QueryExpect`] with empty results.
fn empty_results() -> Self {
Self::Results {
types: Vec::new(),
Expand Down Expand Up @@ -749,12 +749,7 @@ fn parse_inner<T: ColumnType>(loc: &Location, script: &str) -> Result<Vec<Record
results: Vec::new(),
}
}
[] => QueryExpect::Results {
types: Vec::new(),
sort_mode: None,
label: None,
results: Vec::new(),
},
[] => QueryExpect::empty_results(),
};

// The SQL for the query is found on second an subsequent lines of the record
Expand Down

0 comments on commit 00a8f98

Please sign in to comment.