diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml
index d19471a16..828d62561 100644
--- a/.github/workflows/bench.yml
+++ b/.github/workflows/bench.yml
@@ -1,4 +1,4 @@
-name: Benchmark (Linux)
+name: Benchmark
on:
pull_request:
diff --git a/.github/workflows/clippy-fmt.yml b/.github/workflows/clippy-fmt.yml
index fb1ed7f32..e966fa4ab 100644
--- a/.github/workflows/clippy-fmt.yml
+++ b/.github/workflows/clippy-fmt.yml
@@ -1,32 +1,39 @@
+name: Lint
+
on:
pull_request:
types: [opened, synchronize, reopened]
-name: Clippy and rustfmt Check
jobs:
- clippy_check:
+ fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
+ - name: Install Rust
+ uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
- override: true
- name: Check with rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- - uses: actions-rs/toolchain@v1
+ clippy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install Rust
+ uses: actions-rs/toolchain@v1
with:
- toolchain: nightly
+ toolchain: stable
components: clippy
override: true
- name: Check with Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- args: --all-features --all --tests
+ args: --workspace --tests --all-features
diff --git a/.github/workflows/upload-doc.yml b/.github/workflows/upload-doc.yml
index ba87a5637..c080dd8c3 100644
--- a/.github/workflows/upload-doc.yml
+++ b/.github/workflows/upload-doc.yml
@@ -24,7 +24,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: doc
- args: --no-deps --workspace --all-features
+ args: --workspace --all-features --no-deps
- name: Tweak HTML
run: echo "" > target/doc/index.html
diff --git a/src/middleware/condition.rs b/src/middleware/condition.rs
index 85eba3fb8..9263292b9 100644
--- a/src/middleware/condition.rs
+++ b/src/middleware/condition.rs
@@ -106,7 +106,6 @@ mod tests {
HttpResponse,
};
- #[allow(clippy::unnecessary_wraps)]
fn render_500(mut res: ServiceResponse) -> Result> {
res.response_mut()
.headers_mut()
diff --git a/src/middleware/err_handlers.rs b/src/middleware/err_handlers.rs
index 70933241d..b55959460 100644
--- a/src/middleware/err_handlers.rs
+++ b/src/middleware/err_handlers.rs
@@ -182,7 +182,6 @@ mod tests {
use crate::test::{self, TestRequest};
use crate::HttpResponse;
- #[allow(clippy::unnecessary_wraps)]
fn render_500(mut res: ServiceResponse) -> Result> {
res.response_mut()
.headers_mut()
@@ -207,7 +206,6 @@ mod tests {
assert_eq!(resp.headers().get(CONTENT_TYPE).unwrap(), "0001");
}
- #[allow(clippy::unnecessary_wraps)]
fn render_500_async(
mut res: ServiceResponse,
) -> Result> {
diff --git a/tests/test_httpserver.rs b/tests/test_httpserver.rs
index cd5a75d49..07c171674 100644
--- a/tests/test_httpserver.rs
+++ b/tests/test_httpserver.rs
@@ -72,7 +72,6 @@ async fn test_start() {
let _ = sys.stop();
}
-#[allow(clippy::unnecessary_wraps)]
#[cfg(feature = "openssl")]
fn ssl_acceptor() -> std::io::Result {
use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};