Skip to content

Commit

Permalink
Squash warning after embed-resource version bump; enable clippy in ci (
Browse files Browse the repository at this point in the history
…#321)

* run clippy in ci

* fix clippy lint in stats-server project

* squash warning in client project after embed_resource version bump

* use working_directory option rather than cd

Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
Signed-off-by: David Laban <alsuren@gmail.com>

---------

Signed-off-by: David Laban <alsuren@gmail.com>
Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
  • Loading branch information
alsuren and NobodyXu authored Nov 12, 2024
1 parent 1de3bcf commit 456b1a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ jobs:
- name: Fetch tags required for testing
run: git fetch --tags

- name: Run cargo clippy for client project
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Run cargo clippy for stats-server project
run: cargo clippy --all-targets --all-features -- -D warnings
working-directory: stats-server

- name: Run cargo test
run: cargo test

Expand Down
4 changes: 3 additions & 1 deletion cargo-quickinstall/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ fn main() {
println!("cargo:rerun-if-changed=manifest.rc");
println!("cargo:rerun-if-changed=windows.manifest");

embed_resource::compile("manifest.rc", embed_resource::NONE);
embed_resource::compile("manifest.rc", embed_resource::NONE)
.manifest_required()
.unwrap();
}
2 changes: 1 addition & 1 deletion stats-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async fn root() -> &'static str {
}

fn get_env(key: &str) -> String {
std::env::var(key).expect(&format!("{key} must be set"))
std::env::var(key).unwrap_or_else(|_| panic!("{key} must be set"))
}

async fn redirect_to_root() -> Redirect {
Expand Down

0 comments on commit 456b1a2

Please sign in to comment.