Unverified Commit 0e4aec06 authored by Jonas Platte's avatar Jonas Platte
Browse files

Switch from lazy_static to once_cell

This also changes the MSRV from 1.34.0 to 1.36.0.
parent 7225dbbc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ jobs:
        default: false
      image:
        type: string
        default: 1.34.0
        default: 1.36.0
      minimal_build:
        type: boolean
        default: false
@@ -175,7 +175,7 @@ jobs:
        default: false
      image:
        type: string
        default: 1.34.0
        default: 1.36.0
    macos:
      xcode: "12.2.0"
    environment:
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ jobs:
    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        run: rustup update --no-self-update 1.34.0 && rustup default 1.34.0
        run: rustup update --no-self-update 1.36.0 && rustup default 1.36.0
      - name: Get rust version
        id: rust-version
        run: echo "::set-output name=version::$(rustc --version)"
+1 −1
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@ vendored = ['openssl-sys/vendored']
bitflags = "1.0"
cfg-if = "1.0"
foreign-types = "0.3.1"
lazy_static = "1"
libc = "0.2"
once_cell = "1.5.2"

openssl-sys = { version = "0.9.60", path = "../openssl-sys" }

+1 −2
Original line number Diff line number Diff line
@@ -116,9 +116,8 @@ extern crate bitflags;
extern crate cfg_if;
#[macro_use]
extern crate foreign_types;
#[macro_use]
extern crate lazy_static;
extern crate libc;
extern crate once_cell;
extern crate openssl_sys as ffi;

#[cfg(test)]
+3 −3
Original line number Diff line number Diff line
@@ -414,10 +414,10 @@ cfg_if! {
                GeneralName, X509NameRef, X509Ref, X509StoreContext, X509StoreContextRef,
                X509VerifyResult,
            };
            use once_cell::sync::Lazy;

            lazy_static! {
                pub static ref HOSTNAME_IDX: Index<Ssl, String> = Ssl::new_ex_index().unwrap();
            }
            pub static HOSTNAME_IDX: Lazy<Index<Ssl, String>> =
                Lazy::new(|| Ssl::new_ex_index().unwrap());

            pub fn verify_callback(preverify_ok: bool, x509_ctx: &mut X509StoreContextRef) -> bool {
                if !preverify_ok || x509_ctx.error_depth() != 0 {
Loading