summaryrefslogtreecommitdiff
path: root/tests/tests.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2019-10-11 16:13:12 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-10-14 14:15:46 +0200
commitd3727cd36e7f51b2a41891060daaa89da77b4171 (patch)
treea796d39a10fb4aa10fe4ecf8015f41f4fc9bdb7f /tests/tests.rs
parentcd4f0043fb7d9af8e4896526eba8bd6fdcb0452d (diff)
tests: Fix some warning in the test crate.
Diffstat (limited to 'tests/tests.rs')
-rw-r--r--tests/tests.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index f0fc9ff6..a6c8f4a0 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -11,7 +11,7 @@ use std::fs;
use std::io::{self, BufRead, BufReader, Error, ErrorKind, Read, Write};
use std::path::PathBuf;
use std::process;
-use std::sync::{Once, ONCE_INIT};
+use std::sync::Once;
#[path = "../src/options.rs"]
mod options;
@@ -23,7 +23,7 @@ static OVERWRITE_ENV_VAR: &str = "BINDGEN_OVERWRITE_EXPECTED";
// Run `rustfmt` on the given source string and return a tuple of the formatted
// bindings, and rustfmt's stderr.
fn rustfmt(source: String) -> (String, String) {
- static CHECK_RUSTFMT: Once = ONCE_INIT;
+ static CHECK_RUSTFMT: Once = Once::new();
CHECK_RUSTFMT.call_once(|| {
let have_working_rustfmt = process::Command::new("rustup")