Skip to content

Commit

Permalink
featureflags in tests and some cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
meadowsys committed Mar 13, 2024
1 parent 02a509d commit e5f060e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
name: run
runs-on: ubuntu-22.04

strategy:
matrix:
featureflags:
- --features clock-timer,h,lazy-wrap,string-pool,tokio

steps:
- name: checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -20,10 +25,10 @@ jobs:
run: rustc --version

- name: build
run: cargo build --all-features --verbose
run: cargo build --release --verbose ${{ matrix.featureflags }}

- name: test
run: cargo test --all-features --release --verbose
run: cargo test --release --verbose ${{ matrix.featureflags }}
env:
LLVM_PROFILE_FILE: "target/coverage/test-file.profraw"
CARGO_INCREMENTAL: "0"
Expand Down
2 changes: 1 addition & 1 deletion src/clock_timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ super::runtime_selection_compile_check!("clock-timer");
pub use tokio::*;
#[cfg(feature = "tokio")]
mod tokio {
use ::chrono::{ DateTime, Local, NaiveDateTime, ParseError, Timelike as _, Utc };
use ::chrono::{ DateTime, Local, NaiveDateTime, ParseError };
pub use ::chrono::TimeDelta;
use ::thiserror::Error;

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ macro_rules! runtime_selection_compile_check {
compile_error!(concat!("an async runtime is required to make use of `", $featname, "`; available runtimes (enable by selecting the crate feature): `tokio`"));
}
}
#[allow(unused)]
use runtime_selection_compile_check;
2 changes: 1 addition & 1 deletion src/string_pool/pool/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<'h> Equivalent<<GlobalPool as Pool>::Raw> for SlicesWrap<'h> {
// - if a == b, good but not done yet, continue
(Some(a), Some(b)) if a == b => { continue }
// - else (a != b), not good, return false
(Some(a), Some(b)) => { return false }
(Some(_), Some(_)) => { return false }

// Some None
// None Some
Expand Down

0 comments on commit e5f060e

Please sign in to comment.