Commit 46754f1a authored by Alex Gaynor's avatar Alex Gaynor
Browse files

variety of fixes for warnings in new rust

parent e6209d43
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
#![allow(
    // This can be removed once our MSRV is raised to 1.66.
    clippy::uninlined_format_args,
)]

#[cfg(feature = "bindgen")]
extern crate bindgen;
extern crate cc;
+3 −3
Original line number Diff line number Diff line
@@ -164,12 +164,12 @@ mod openssl {
            _file: *const c_char,
            _line: c_int,
        ) {
            let mutex = &(*MUTEXES)[n as usize];
            let mutex = &(&(*MUTEXES))[n as usize];

            if mode & CRYPTO_LOCK != 0 {
                (*GUARDS)[n as usize] = Some(mutex.lock().unwrap());
                (&mut (*GUARDS))[n as usize] = Some(mutex.lock().unwrap());
            } else {
                if let None = (*GUARDS)[n as usize].take() {
                if let None = (&mut (*GUARDS))[n as usize].take() {
                    let _ = writeln!(
                        io::stderr(),
                        "BUG: rust-openssl lock {} already unlocked, aborting",