From f337d50e1f3e6dff65f01c127b09a935e10617e9 Mon Sep 17 00:00:00 2001 From: xiaofei0800 Date: Thu, 23 Nov 2023 16:24:11 +0800 Subject: [PATCH] Add clippy for apps directory. --- .github/workflows/rust.yml | 5 ++++- apps/src/bin/tquic_server.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 06272262..5391f6ce 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,6 +19,9 @@ jobs: with: submodules: 'recursive' + - name: Update rust + run: rustup update + - name: Code format check run: cargo fmt --check @@ -29,7 +32,7 @@ jobs: run: cargo build --all --verbose - name: Code lint check - run: cargo clippy + run: cargo clippy --all -- -D warnings - name: Unit testing run: cargo test --verbose diff --git a/apps/src/bin/tquic_server.rs b/apps/src/bin/tquic_server.rs index 66ba19dd..df71567c 100644 --- a/apps/src/bin/tquic_server.rs +++ b/apps/src/bin/tquic_server.rs @@ -270,7 +270,7 @@ struct ConnectionHandler { impl ConnectionHandler { fn generate_file_path(uri: &str, root: &str) -> path::PathBuf { let uri = path::Path::new(uri); - let mut path = path::PathBuf::from(root.clone()); + let mut path = path::PathBuf::from(root); for c in uri.components() { if let path::Component::Normal(v) = c {