Cargo Format

Run `cargo fmt` and ignore generated files
This commit is contained in:
Jeremy A. Kolb 2018-10-15 17:44:23 -04:00
parent 39cb6c6d3f
commit 61f3a438d3
76 changed files with 1936 additions and 1530 deletions

View file

@ -1,17 +1,17 @@
extern crate itertools;
#[macro_use]
extern crate failure;
extern crate heck;
extern crate ron;
extern crate tera;
extern crate heck;
use heck::{CamelCase, ShoutySnakeCase, SnakeCase};
use itertools::Itertools;
use std::{
collections::HashMap,
fs,
path::{Path, PathBuf},
};
use itertools::Itertools;
use heck::{CamelCase, ShoutySnakeCase, SnakeCase};
pub type Result<T> = ::std::result::Result<T, failure::Error>;
@ -61,7 +61,6 @@ pub fn collect_tests(s: &str) -> Vec<(usize, Test)> {
res
}
pub fn update(path: &Path, contents: &str, verify: bool) -> Result<()> {
match fs::read_to_string(path) {
Ok(ref old_contents) if old_contents == contents => {
@ -116,5 +115,8 @@ pub fn render_template(template: &Path) -> Result<String> {
}
pub fn project_root() -> PathBuf {
Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap()).parent().unwrap().to_path_buf()
Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap())
.parent()
.unwrap()
.to_path_buf()
}