Skip to content

Commit a796412

Browse files
committed
cleaned formatting
1 parent a79449d commit a796412

2 files changed

Lines changed: 8 additions & 14 deletions

File tree

src/ast.rs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ mod tests {
149149
Ok(())
150150
}
151151

152-
#[test]
152+
#[test]
153153
fn parsed_sql_file_path_into_path_buf_round_trips() -> Result<(), Box<dyn std::error::Error>> {
154154
let base = env::temp_dir().join("parsed_sql_file_path_into_path_buf_round_trips");
155155
let _ = fs::remove_dir_all(&base);
@@ -165,7 +165,8 @@ mod tests {
165165
}
166166

167167
#[test]
168-
fn parsed_sql_file_parse_postgres_handles_pg_function_syntax() -> Result<(), Box<dyn std::error::Error>> {
168+
fn parsed_sql_file_parse_postgres_handles_pg_function_syntax()
169+
-> Result<(), Box<dyn std::error::Error>> {
169170
let sql = r"
170171
CREATE OR REPLACE FUNCTION f()
171172
RETURNS SMALLINT
@@ -188,17 +189,15 @@ mod tests {
188189
"expected at least 2 statements (function + table)"
189190
);
190191
assert!(
191-
parsed
192-
.statements()
193-
.iter()
194-
.any(|s| matches!(s, Statement::CreateTable { .. })),
192+
parsed.statements().iter().any(|s| matches!(s, Statement::CreateTable { .. })),
195193
"expected at least one CreateTable statement"
196194
);
197195
Ok(())
198196
}
199197

200198
#[test]
201-
fn parsed_sql_file_set_parse_all_uses_default_dialect() -> Result<(), Box<dyn std::error::Error>> {
199+
fn parsed_sql_file_set_parse_all_uses_default_dialect() -> Result<(), Box<dyn std::error::Error>>
200+
{
202201
let base = env::temp_dir().join("parsed_sql_file_set_parse_all_default_dialect");
203202
let _ = fs::remove_dir_all(&base);
204203
fs::create_dir_all(&base)?;
@@ -231,10 +230,7 @@ mod tests {
231230

232231
for parsed in parsed_set.files() {
233232
assert!(
234-
parsed
235-
.statements()
236-
.iter()
237-
.any(|s| matches!(s, Statement::CreateTable { .. })),
233+
parsed.statements().iter().any(|s| matches!(s, Statement::CreateTable { .. })),
238234
"expected CreateTable in parsed file; got statements: {:?}",
239235
parsed.statements()
240236
);
@@ -246,10 +242,9 @@ mod tests {
246242

247243
#[test]
248244
fn parsed_sql_file_parse_invalid_sql_returns_error() {
249-
let sql = "CREATE TABLE";
245+
let sql = "CREATE TABLE";
250246
let src = SqlSource::from_str(sql.to_owned(), None);
251247
let res = ParsedSqlFile::parse(src, &Dialects::Generic);
252248
assert!(res.is_err(), "expected parse to fail for invalid SQL");
253249
}
254-
255250
}

src/sql_doc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::{
66
vec,
77
};
88

9-
109
use crate::{
1110
ast::ParsedSqlFile,
1211
comments::{Comments, LeadingCommentCapture, MultiFlatten},

0 commit comments

Comments
 (0)