Skip to content

Commit

Permalink
Rustfmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Sep 17, 2019
1 parent 3062841 commit 2f621dd
Show file tree
Hide file tree
Showing 45 changed files with 2,312 additions and 1,937 deletions.
11 changes: 6 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ mod target {
pub fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());

let mut dst = File::create(Path::new(&out_dir).join("host-target.txt"))
.unwrap();
let mut dst =
File::create(Path::new(&out_dir).join("host-target.txt")).unwrap();
dst.write_all(env::var("TARGET").unwrap().as_bytes())
.unwrap();
}
Expand All @@ -24,8 +24,8 @@ mod testgen {

pub fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let mut dst = File::create(Path::new(&out_dir).join("tests.rs"))
.unwrap();
let mut dst =
File::create(Path::new(&out_dir).join("tests.rs")).unwrap();

let manifest_dir =
PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
Expand Down Expand Up @@ -57,7 +57,8 @@ mod testgen {
"test_header!(header_{}, {:?});",
func,
entry.path(),
).unwrap();
)
.unwrap();
}
_ => {}
}
Expand Down
5 changes: 1 addition & 4 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
max_width = 80
brace_style = "SameLineWhere"
struct_lit_single_line = false
where_trailing_comma = true
normalize_comments = false
binop_separator = "back"
3 changes: 1 addition & 2 deletions src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ pub trait ParseCallbacks: fmt::Debug + UnwindSafe {

/// This will be run on every string macro. The callback can not influence the further
/// treatment of the macro, but may use the value to generate additional code or configuration.
fn str_macro(&self, _name: &str, _value: &[u8]) {
}
fn str_macro(&self, _name: &str, _value: &[u8]) {}

/// This function should return whether, given an enum variant
/// name, and value, this enum variant will forcibly be a constant.
Expand Down
Loading

0 comments on commit 2f621dd

Please # to comment.