diff options
-rw-r--r-- | tests/expectations/build.rs | 2 | ||||
-rw-r--r-- | tests/tests.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/expectations/build.rs b/tests/expectations/build.rs index 0aae10de..4e83fc26 100644 --- a/tests/expectations/build.rs +++ b/tests/expectations/build.rs @@ -37,7 +37,7 @@ fn main() { .to_string() .chars() .map(|c| match c { - 'a'...'z' | 'A'...'Z' | '0'...'9' => c, + 'a'..='z' | 'A'..='Z' | '0'..='9' => c, _ => '_', }) .collect(); 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") |