Skip to content

Commit

Permalink
Apply RustFmt and Clippy recommended changes
Browse files Browse the repository at this point in the history
In order to make the CI work, we need to comply with RustFmt and Clippy
rules.
  • Loading branch information
luismiramirez committed Sep 16, 2021
1 parent a68b071 commit a87846c
Show file tree
Hide file tree
Showing 5 changed files with 531 additions and 366 deletions.
8 changes: 4 additions & 4 deletions src/bin/main.rs
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"),
}
}

0 comments on commit a87846c

Please sign in to comment.