mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Fix a bunch of trivial clippy lints
This commit is contained in:
parent
3df2223d95
commit
c223eaf0aa
7 changed files with 70 additions and 84 deletions
|
@ -14,8 +14,8 @@ fn main() {
|
|||
.nth(1)
|
||||
.expect("No arguments provided!\n\nUsage: cargo run --example cli FILENAME.sql");
|
||||
|
||||
let contents =
|
||||
fs::read_to_string(&filename).expect(&format!("Unable to read the file {}", &filename));
|
||||
let contents = fs::read_to_string(&filename)
|
||||
.unwrap_or_else(|_| panic!("Unable to read the file {}", &filename));
|
||||
let without_bom = if contents.chars().nth(0).unwrap() as u64 != 0xfeff {
|
||||
contents.as_str()
|
||||
} else {
|
||||
|
@ -31,7 +31,7 @@ fn main() {
|
|||
"Round-trip:\n'{}'",
|
||||
statements
|
||||
.iter()
|
||||
.map(|s| s.to_string())
|
||||
.map(std::string::ToString::to_string)
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue