chore: remove unused import

This commit is contained in:
Rob Ede 2024-02-03 17:07:43 +00:00
parent eb67653ab1
commit d128970003
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 16 additions and 17 deletions

View File

@ -44,12 +44,12 @@ jobs:
- name: Install OpenSSL - name: Install OpenSSL
if: matrix.target.os == 'windows-latest' if: matrix.target.os == 'windows-latest'
run: choco install openssl -y --forcex64 --no-progress shell: bash
- name: Set OpenSSL dir in env
if: matrix.target.os == 'windows-latest'
run: | run: |
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL-Win64' | Out-File -FilePath $env:GITHUB_ENV -Append set -e
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' | Out-File -FilePath $env:GITHUB_ENV -Append choco install openssl --version=1.1.1.2100 -y --no-progress
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' >> $GITHUB_ENV
echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV
- name: Install Rust (${{ matrix.version }}) - name: Install Rust (${{ matrix.version }})
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0 uses: actions-rust-lang/setup-rust-toolchain@v1.8.0

View File

@ -46,12 +46,12 @@ jobs:
- name: Install OpenSSL - name: Install OpenSSL
if: matrix.target.os == 'windows-latest' if: matrix.target.os == 'windows-latest'
run: choco install openssl -y --forcex64 --no-progress shell: bash
- name: Set OpenSSL dir in env
if: matrix.target.os == 'windows-latest'
run: | run: |
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL-Win64' | Out-File -FilePath $env:GITHUB_ENV -Append set -e
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' | Out-File -FilePath $env:GITHUB_ENV -Append choco install openssl --version=1.1.1.2100 -y --no-progress
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' >> $GITHUB_ENV
echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV
- name: Install Rust (${{ matrix.version.name }}) - name: Install Rust (${{ matrix.version.name }})
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0 uses: actions-rust-lang/setup-rust-toolchain@v1.8.0

View File

@ -16,9 +16,8 @@ use actix_utils::future::{ok, Ready};
use futures_core::ready; use futures_core::ready;
use rustls_pki_types_1::ServerName; use rustls_pki_types_1::ServerName;
use tokio_rustls::{ use tokio_rustls::{
client::TlsStream as AsyncTlsStream, client::TlsStream as AsyncTlsStream, rustls::ClientConfig, Connect as RustlsConnect,
rustls::{ClientConfig, RootCertStore}, TlsConnector as RustlsTlsConnector,
Connect as RustlsConnect, TlsConnector as RustlsTlsConnector,
}; };
use tokio_rustls_025 as tokio_rustls; use tokio_rustls_025 as tokio_rustls;
@ -36,8 +35,8 @@ pub mod reexports {
/// ///
/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors. /// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
#[cfg(feature = "rustls-0_22-native-roots")] #[cfg(feature = "rustls-0_22-native-roots")]
pub fn native_roots_cert_store() -> io::Result<RootCertStore> { pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
let mut root_certs = RootCertStore::empty(); let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
for cert in rustls_native_certs_07::load_native_certs()? { for cert in rustls_native_certs_07::load_native_certs()? {
root_certs.add(cert).unwrap(); root_certs.add(cert).unwrap();
@ -48,8 +47,8 @@ pub fn native_roots_cert_store() -> io::Result<RootCertStore> {
/// Returns standard root certificates from `webpki-roots` crate as a rustls certificate store. /// Returns standard root certificates from `webpki-roots` crate as a rustls certificate store.
#[cfg(feature = "rustls-0_22-webpki-roots")] #[cfg(feature = "rustls-0_22-webpki-roots")]
pub fn webpki_roots_cert_store() -> RootCertStore { pub fn webpki_roots_cert_store() -> tokio_rustls::rustls::RootCertStore {
let mut root_certs = RootCertStore::empty(); let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
root_certs.extend(webpki_roots_026::TLS_SERVER_ROOTS.to_owned()); root_certs.extend(webpki_roots_026::TLS_SERVER_ROOTS.to_owned());
root_certs root_certs
} }