aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-10-29 12:40:41 -0400
committerJesse Luehrs <doy@tozt.net>2019-10-29 12:40:41 -0400
commite525fddb572614f4c6d6a7d71ed44e9dfe7af350 (patch)
tree673d83f4e040080fd9040ea4d711546d18dd1bd6 /build.rs
parent0cd015222e80497c823fc0eadc8f55c45860bade (diff)
downloadvt100-rust-e525fddb572614f4c6d6a7d71ed44e9dfe7af350.tar.gz
vt100-rust-e525fddb572614f4c6d6a7d71ed44e9dfe7af350.zip
rustfmt
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/build.rs b/build.rs
index 055ac17..5c50c00 100644
--- a/build.rs
+++ b/build.rs
@@ -3,40 +3,40 @@ extern crate pkg_config;
fn libvt100() {
let dir = std::env::current_dir()
- .unwrap_or_else(|e| { panic!("couldn't get cwd: {}", e) });;
+ .unwrap_or_else(|e| panic!("couldn't get cwd: {}", e));;
std::env::set_current_dir("libvt100")
- .unwrap_or_else(|e| { panic!("failed to chdir: {}", e) });
+ .unwrap_or_else(|e| panic!("failed to chdir: {}", e));
let absdir = std::env::current_dir()
- .unwrap_or_else(|e| { panic!("couldn't get cwd: {}", e) });;
+ .unwrap_or_else(|e| panic!("couldn't get cwd: {}", e));;
let out = std::process::Command::new("make")
.arg("static")
.output()
- .unwrap_or_else(|e| { panic!("failed to exec: {}", e) });
+ .unwrap_or_else(|e| panic!("failed to exec: {}", e));
std::env::set_current_dir(dir)
- .unwrap_or_else(|e| { panic!("failed to chdir: {}", e) });
+ .unwrap_or_else(|e| panic!("failed to chdir: {}", e));
if !out.status.success() {
println!("{}", std::string::String::from_utf8_lossy(&out.stderr));
std::process::exit(out.status.code().unwrap_or(255));
}
- println!("cargo:rustc-link-search=native={}", absdir.to_str().unwrap());
+ println!(
+ "cargo:rustc-link-search=native={}",
+ absdir.to_str().unwrap()
+ );
println!("cargo:rustc-link-lib=static=vt100");
}
fn glib() {
- let lib_def = pkg_config::probe_library("glib-2.0")
- .unwrap_or_else(|e| {
- panic!("Couldn't find required dependency glib-2.0: {}", e);
- });
+ let lib_def = pkg_config::probe_library("glib-2.0").unwrap_or_else(|e| {
+ panic!("Couldn't find required dependency glib-2.0: {}", e);
+ });
for dir in lib_def.link_paths {
println!("cargo:rustc-link-search=native={}", dir.to_str().unwrap());
}
}
fn libvt100_wrappers() {
- cc::Build::new()
- .file("src/ffi.c")
- .compile("vt100wrappers");
+ cc::Build::new().file("src/ffi.c").compile("vt100wrappers");
}
fn main() {