Auto merge of #21675 - chansuke:format_libsimpleservo, r=jdm

Format ports/libsimpleservo

<!-- Please describe your changes on the following line: -->
Format `ports/libsimpleservo` with:

`rustfmt ports/libsimpleservo/*.rs`

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix part of #21373.
- [x] These changes do not require tests because they format code only.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21675)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-09-11 09:56:11 -04:00 committed by GitHub
commit 91ce5d805c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,8 @@ fn main() {
fn android_main() {
// Get the NDK path from NDK_HOME env.
let ndk_path = env::var_os("ANDROID_NDK").expect("Please set the ANDROID_NDK environment variable");
let ndk_path =
env::var_os("ANDROID_NDK").expect("Please set the ANDROID_NDK environment variable");
let ndk_path = Path::new(&ndk_path);
let target = env::var("TARGET").unwrap();
@ -43,7 +44,11 @@ fn android_main() {
};
// compiling android_native_app_glue.c
let c_file = ndk_path.join("sources").join("android").join("native_app_glue").join("android_native_app_glue.c");
let c_file = ndk_path
.join("sources")
.join("android")
.join("native_app_glue")
.join("android_native_app_glue.c");
let sysroot = ndk_path.join("platforms").join(platform).join(arch);
cc::Build::new()
.file(c_file)
@ -53,13 +58,13 @@ fn android_main() {
.compile("android_native_app_glue");
// Get the output directory.
let out_dir = env::var("OUT_DIR").expect("Cargo should have set the OUT_DIR environment variable");
let out_dir =
env::var("OUT_DIR").expect("Cargo should have set the OUT_DIR environment variable");
println!("cargo:rustc-link-lib=static=android_native_app_glue");
println!("cargo:rustc-link-search=native={}", out_dir);
println!("cargo:rustc-link-lib=log");
println!("cargo:rustc-link-lib=android");
}
fn generate_gl_bindings(target: &str) {