diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b937d0b..1ac592ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Build Debug run: | rustc --version - cargo build + cargo build --features=fail-on-deprecated - name: Run tests run: cargo test diff --git a/Cargo.toml b/Cargo.toml index b922a995..cbeb5f65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,3 +43,6 @@ base64 = "0.13.0" lazy_static = "1.4" more-asserts = "0.2" paste = "1" + +[features] +fail-on-deprecated = [] \ No newline at end of file diff --git a/Makefile b/Makefile index 11c85971..df101781 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ build: - cargo build --release + cargo build --release --features=fail-on-deprecated install: build sudo cp target/release/onefetch /usr/local/bin diff --git a/src/main.rs b/src/main.rs index 23dc4ffa..c059a03e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ // `error_chain!` can recurse deeply #![recursion_limit = "1024"] +#![cfg_attr(feature="fail-on-deprecated", deny(deprecated))] use onefetch::{cli::Cli, cli_utils, error::*, info};