Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): Remove debug println! #287

Merged
merged 4 commits into from
Mar 27, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions tonic-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ pub mod schema;
#[cfg(feature = "rustfmt")]
use std::process::Command;

/// Serivce code generation for client
/// Service code generation for client
pub mod client;
/// Serivce code generation for Server
/// Service code generation for Server
pub mod server;

/// Format files under the out_dir with rustfmt
Expand All @@ -83,17 +83,18 @@ pub fn fmt(out_dir: &str) {
if !file.ends_with(".rs") {
continue;
}
let out = Command::new("rustfmt")
let result = Command::new("rustfmt")
.arg("--emit")
.arg("files")
.arg("--edition")
.arg("2018")
.arg(format!("{}/{}", out_dir, file))
.output()
.unwrap();
.output();

println!("out: {:?}", out);
alce marked this conversation as resolved.
Show resolved Hide resolved
assert!(out.status.success());
match result {
Err(e) => println!("error running rustfmt: {:?}", e),
Ok(out) => assert!(out.status.success()),
alce marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

Expand Down