diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f797860..41b2145 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -3,10 +3,10 @@ name: Build on: push: branches: - - '*' + - "*" pull_request: branches: - - '*' + - "*" env: CARGO_TERM_COLOR: always @@ -20,15 +20,17 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@v2 - - name: Install LLVM and Clang - if: startsWith(matrix.os, 'windows') - uses: KyleMayes/install-llvm-action@v1 - with: - version: "11.0" - directory: ${{ runner.temp }}/llvm - - name: Set LIBCLANG_PATH - if: startsWith(matrix.os, 'windows') - run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV - - name: Run tests - run: bash ./ci-tests.sh + - uses: actions/checkout@v2 + - name: Install LLVM and Clang + if: startsWith(matrix.os, 'windows') + uses: KyleMayes/install-llvm-action@v1 + with: + version: "11.0" + directory: ${{ runner.temp }}/llvm + - name: Set LIBCLANG_PATH + if: startsWith(matrix.os, 'windows') + run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV + - name: Run tests + run: bash ./ci-tests.sh + - name: Run Clippy + run: cargo clippy --all-targets --all-features diff --git a/ci-tests.sh b/ci-tests.sh index a49562d..110829a 100755 --- a/ci-tests.sh +++ b/ci-tests.sh @@ -16,3 +16,4 @@ if ! rustc -vV | grep 'host: .*windows' &> /dev/null; then fi cargo test $TARGET --features "libsodium-resolver $COMMON_FEATURES" cargo test $TARGET --features "libsodium-accelerated $COMMON_FEATURES" + diff --git a/src/resolvers.rs b/src/resolvers.rs index e6c15dd..53764c0 100644 --- a/src/resolvers.rs +++ b/src/resolvers.rs @@ -60,7 +60,8 @@ pub struct FallbackResolver { impl FallbackResolver { /// Create a new `FallbackResolver` that holds the primary and secondary resolver. - #[must_use] pub fn new(preferred: BoxedCryptoResolver, fallback: BoxedCryptoResolver) -> Self { + #[must_use] + pub fn new(preferred: BoxedCryptoResolver, fallback: BoxedCryptoResolver) -> Self { Self { preferred, fallback } } }