From d7afd60606668ca411968924cf9f09ceac7841de Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 21 Dec 2022 21:17:21 +0000 Subject: [PATCH] workaround env-logger msrv --- .github/workflows/ci.yml | 7 +++++++ actix-server/Cargo.toml | 2 +- actix-tls/examples/accept-rustls.rs | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 120c64c9..47d474ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,13 @@ jobs: if: matrix.version == '1.59.0' run: cargo install cargo-hack --version=0.5.21 + - name: workaround MSRV issues + if: matrix.version == 'stable' + run: | + cargo install cargo-edit --version=0.8.0 + cargo add env_logger@0.9 --dev -p=actix-tls + cargo add env_logger@0.9 --dev -p=actix-server + - name: Generate Cargo.lock uses: actions-rs/cargo@v1 with: { command: generate-lockfile } diff --git a/actix-server/Cargo.toml b/actix-server/Cargo.toml index de3638a2..e23880f3 100755 --- a/actix-server/Cargo.toml +++ b/actix-server/Cargo.toml @@ -44,6 +44,6 @@ actix-codec = "0.5" actix-rt = "2.8" bytes = "1" -env_logger = "0.9" +env_logger = "0.10" futures-util = { version = "0.3.17", default-features = false, features = ["sink", "async-await-macro"] } tokio = { version = "1.13.1", features = ["io-util", "rt-multi-thread", "macros", "fs"] } diff --git a/actix-tls/examples/accept-rustls.rs b/actix-tls/examples/accept-rustls.rs index 6a90616d..7d964d10 100644 --- a/actix-tls/examples/accept-rustls.rs +++ b/actix-tls/examples/accept-rustls.rs @@ -41,8 +41,7 @@ use tracing::info; #[actix_rt::main] async fn main() -> io::Result<()> { - env::set_var("RUST_LOG", "info"); - env_logger::init(); + env_logger::init_from_env(env_logger::Env::default().default_filter_or("info")); // Load TLS key and cert files let cert_file = &mut BufReader::new(File::open("./examples/cert.pem").unwrap());