Skip to content

Commit c8c93d6

Browse files
committed
tests: Fix some warning in the test crate.
1 parent 5a963d9 commit c8c93d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/expectations/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn main() {
3737
.to_string()
3838
.chars()
3939
.map(|c| match c {
40-
'a'...'z' | 'A'...'Z' | '0'...'9' => c,
40+
'a'..='z' | 'A'..='Z' | '0'..='9' => c,
4141
_ => '_',
4242
})
4343
.collect();

tests/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::fs;
1111
use std::io::{self, BufRead, BufReader, Error, ErrorKind, Read, Write};
1212
use std::path::PathBuf;
1313
use std::process;
14-
use std::sync::{Once, ONCE_INIT};
14+
use std::sync::Once;
1515

1616
#[path = "../src/options.rs"]
1717
mod options;
@@ -23,7 +23,7 @@ static OVERWRITE_ENV_VAR: &str = "BINDGEN_OVERWRITE_EXPECTED";
2323
// Run `rustfmt` on the given source string and return a tuple of the formatted
2424
// bindings, and rustfmt's stderr.
2525
fn rustfmt(source: String) -> (String, String) {
26-
static CHECK_RUSTFMT: Once = ONCE_INIT;
26+
static CHECK_RUSTFMT: Once = Once::new();
2727

2828
CHECK_RUSTFMT.call_once(|| {
2929
let have_working_rustfmt = process::Command::new("rustup")

0 commit comments

Comments
 (0)