-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply RustFmt and Clippy recommended changes
In order to make the CI work, we need to comply with RustFmt and Clippy rules.
- Loading branch information
1 parent
a68b071
commit cf6f322
Showing
6 changed files
with
530 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
extern crate sql_lexer; | ||
|
||
use std::env; | ||
use std::io::prelude::*; | ||
use std::fs::File; | ||
use std::io::prelude::*; | ||
|
||
use sql_lexer::*; | ||
|
||
fn main() { | ||
match env::args().skip(1).next() { | ||
match env::args().nth(1) { | ||
Some(arg) => { | ||
let mut file = File::open(arg.as_str()).unwrap(); | ||
let mut contents = String::new(); | ||
file.read_to_string(&mut contents).unwrap(); | ||
println!("{}", sanitize_string(contents)); | ||
}, | ||
None => println!("Please supply a path to a file containing SQL") | ||
} | ||
None => println!("Please supply a path to a file containing SQL"), | ||
} | ||
} |
Oops, something went wrong.