Skip to content

Commit

Permalink
fix(build): Ignore non .rs files with rustfmt (#284)
Browse files Browse the repository at this point in the history
Fixes #283
  • Loading branch information
LucioFranco committed Mar 5, 2020
1 parent f65cda1 commit 7dfa2a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tonic-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ pub fn fmt(out_dir: &str) {

for entry in dir {
let file = entry.unwrap().file_name().into_string().unwrap();
if !file.ends_with(".rs") {
continue;
}
let out = Command::new("rustfmt")
.arg("--emit")
.arg("files")
Expand Down

0 comments on commit 7dfa2a2

Please sign in to comment.