Skip to content

Commit

Permalink
Merge pull request #114 from epage/multiline
Browse files Browse the repository at this point in the history
style: Make clippy happy
  • Loading branch information
epage committed Oct 7, 2021
2 parents 12c7ec8 + 5ac50b2 commit 6a15153
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-next.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/tree/examples/failures.rs
Expand Up @@ -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);
Expand Down
7 changes: 3 additions & 4 deletions src/str/normalize.rs
Expand Up @@ -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.
Expand Down Expand Up @@ -39,12 +38,12 @@ where
P: Predicate<str>,
{
fn eval(&self, variable: &str) -> bool {
self.p
.eval(&String::from_iter(normalized(variable.chars())))
let variable = normalized(variable.chars()).collect::<String>();
self.p.eval(&variable)
}

fn find_case<'a>(&'a self, expected: bool, variable: &str) -> Option<reflection::Case<'a>> {
let variable = String::from_iter(normalized(variable.chars()));
let variable = normalized(variable.chars()).collect::<String>();
self.p.find_case(expected, &variable)
}
}
Expand Down

0 comments on commit 6a15153

Please sign in to comment.