Skip to content

Commit

Permalink
Merge pull request #34 from DanGould/clippy
Browse files Browse the repository at this point in the history
`cargo clippy`
  • Loading branch information
DanGould authored Mar 27, 2024
2 parents 8bbf3ba + d1d6f2f commit 872afd2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,16 @@ jobs:
- run: rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: fmt check
run: cargo fmt --all -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1.2.0
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- run: rustup component add clippy
- name: Clippy check
run: cargo clippy -- -D warnings
3 changes: 1 addition & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
use http_body_util::combinators::BoxBody;
use http_body_util::BodyExt;
use hyper::body::Bytes;
use hyper::header::{HeaderValue, ACCESS_CONTROL_ALLOW_ORIGIN};
use hyper::{Response, StatusCode};

use crate::{empty, full};

#[derive(Debug)]
#[allow(clippy::enum_variant_names)]
pub(crate) enum Error {
BadGateway,
MethodNotAllowed,
UnsupportedMediaType,
BadRequest(String),
NotFound,
#[allow(clippy::enum_variant_names)]
InternalServerError,
}

Expand Down

0 comments on commit 872afd2

Please sign in to comment.