From 842c875f92cdce1fa313f5cd0a871c9a3b2a79f2 Mon Sep 17 00:00:00 2001 From: Alexandra Sandulescu Date: Thu, 27 Jan 2022 18:10:19 +0100 Subject: [PATCH 1/2] Update dependencies --- Cargo.toml | 14 +++++++------- examples/utils.rs | 5 ++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 17884dc4e..448f72d86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,18 +17,18 @@ autoexamples = false [dependencies] managed = { version = "0.8", default-features = false, features = ["map"] } -byteorder = { version = "1.0", default-features = false } -log = { version = "0.4.4", default-features = false, optional = true } -libc = { version = "0.2.18", optional = true } -bitflags = { version = "1.0", default-features = false } +byteorder = { version = "1.4", default-features = false } +log = { version = "0.4.14", default-features = false, optional = true } +libc = { version = "0.2.115", optional = true } +bitflags = { version = "1.3", default-features = false } defmt = { version = "0.3", optional = true } rand_core = { version = "0.6.3", optional = true, default-features = false } [dev-dependencies] -env_logger = "0.5" +env_logger = "0.9" getopts = "0.2" -rand = "0.3" -url = "1.0" +rand = "0.8" +url = "2.0" [features] std = ["managed/std", "rand_core/std"] diff --git a/examples/utils.rs b/examples/utils.rs index f82dd9a08..c9cc70c7a 100644 --- a/examples/utils.rs +++ b/examples/utils.rs @@ -23,7 +23,7 @@ pub fn setup_logging_with_clock(filter: &str, since_startup: F) where F: Fn() -> Instant + Send + Sync + 'static, { - Builder::new() + Builder::from_default_env() .format(move |buf, record| { let elapsed = since_startup(); let timestamp = format!("[{}]", elapsed); @@ -54,8 +54,7 @@ where } }) .filter(None, LevelFilter::Trace) - .parse(filter) - .parse(&env::var("RUST_LOG").unwrap_or_else(|_| "".to_owned())) + .parse_filters(filter) .init(); } From 9b5abf0e8802b963e64e317db87f903e1cf66dfe Mon Sep 17 00:00:00 2001 From: Alexandra Sandulescu Date: Fri, 28 Jan 2022 18:45:55 +0100 Subject: [PATCH 2/2] Update dependencies: ignore those updated through caret spec * allow logging environment overwrite by RUST_LOG --- Cargo.toml | 8 ++++---- examples/utils.rs | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 448f72d86..f10303837 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,10 +17,10 @@ autoexamples = false [dependencies] managed = { version = "0.8", default-features = false, features = ["map"] } -byteorder = { version = "1.4", default-features = false } -log = { version = "0.4.14", default-features = false, optional = true } -libc = { version = "0.2.115", optional = true } -bitflags = { version = "1.3", default-features = false } +byteorder = { version = "1.0", default-features = false } +log = { version = "0.4.4", default-features = false, optional = true } +libc = { version = "0.2.18", optional = true } +bitflags = { version = "1.0", default-features = false } defmt = { version = "0.3", optional = true } rand_core = { version = "0.6.3", optional = true, default-features = false } diff --git a/examples/utils.rs b/examples/utils.rs index c9cc70c7a..dcee7b4a6 100644 --- a/examples/utils.rs +++ b/examples/utils.rs @@ -23,7 +23,7 @@ pub fn setup_logging_with_clock(filter: &str, since_startup: F) where F: Fn() -> Instant + Send + Sync + 'static, { - Builder::from_default_env() + Builder::new() .format(move |buf, record| { let elapsed = since_startup(); let timestamp = format!("[{}]", elapsed); @@ -55,6 +55,7 @@ where }) .filter(None, LevelFilter::Trace) .parse_filters(filter) + .parse_env("RUST_LOG") .init(); }