diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36de16e..21a4dee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: - name: No-default features run: cargo test --workspace --no-default-features msrv: - name: "Check MSRV: 1.40.0" + name: "Check MSRV: 1.54.0" needs: smoke runs-on: ubuntu-latest steps: @@ -76,7 +76,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.40.0 # MSRV + toolchain: 1.54.0 # MSRV profile: minimal override: true - uses: Swatinem/rust-cache@v1 @@ -129,7 +129,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.40.0 # MSRV + toolchain: 1.54.0 # MSRV profile: minimal override: true components: clippy diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index 95e7914..af71a19 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -57,9 +57,9 @@ jobs: strategy: matrix: rust: - - 1.44.0 # MSRV + - 1.54.0 # MSRV - stable - continue-on-error: ${{ matrix.rust != '1.44.0' }} # MSRV + continue-on-error: ${{ matrix.rust != '1.54.0' }} # MSRV runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/crates/tree/examples/failures.rs b/crates/tree/examples/failures.rs index ffdf386..9ba640c 100644 --- a/crates/tree/examples/failures.rs +++ b/crates/tree/examples/failures.rs @@ -12,7 +12,7 @@ fn main() { let expected = [1, 2, 3]; let actual = 15; - let pred = predicates::iter::in_iter(expected); + let pred = predicates::iter::in_iter(IntoIterator::into_iter(expected)); if let Some(case) = pred.find_case(false, &actual) { let tree = case.tree(); println!("{}", tree); diff --git a/src/str/normalize.rs b/src/str/normalize.rs index 893b5b6..9ab3f85 100644 --- a/src/str/normalize.rs +++ b/src/str/normalize.rs @@ -11,7 +11,6 @@ use crate::Predicate; use std::fmt; use normalize_line_endings::normalized; -use std::iter::FromIterator; #[derive(Debug, Clone, Copy, PartialEq, Eq)] /// Predicate adapter that normalizes the newlines contained in the variable being tested. @@ -39,12 +38,12 @@ where P: Predicate, { fn eval(&self, variable: &str) -> bool { - self.p - .eval(&String::from_iter(normalized(variable.chars()))) + let variable = normalized(variable.chars()).collect::(); + self.p.eval(&variable) } fn find_case<'a>(&'a self, expected: bool, variable: &str) -> Option> { - let variable = String::from_iter(normalized(variable.chars())); + let variable = normalized(variable.chars()).collect::(); self.p.find_case(expected, &variable) } }