mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Fix a new clippy lint (.nth(0)
) to unbreak CI
"iter.next() is equivalent to iter.nth(0), as they both consume the next element, but is more readable." https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
This commit is contained in:
parent
172ba42001
commit
4ce0eb11ae
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ fn main() {
|
|||
println!("Parsing from file '{}' using {:?}", &filename, dialect);
|
||||
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 {
|
||||
let without_bom = if contents.chars().next().unwrap() as u64 != 0xfeff {
|
||||
contents.as_str()
|
||||
} else {
|
||||
let mut chars = contents.chars();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue