Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update components.rs #6

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/BuildQualityChecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ "main" ]

permissions:
checks: write

env:
CARGO_TERM_COLOR: always
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -28,11 +31,13 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: giraffate/clippy-action@v1
- uses: LoliGothick/clippy-check@master
with:
reporter: 'github-pr-review'
level: 'warning'
github_token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
allow: >
nonstandard_macro_braces
mutex_atomic
deny: warnings
# quality:
# runs-on: ubuntu-latest
# steps:
Expand Down
6 changes: 4 additions & 2 deletions src/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@

impl GameState {
pub fn new() -> Self {
Self {
let s = Self {
players: vec![
Owner {
name: "Player".to_string(),
Expand All @@ -226,7 +226,9 @@
},
],
..default()
}
};

return s;

Check failure on line 231 in src/components.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

error: unneeded `return` statement --> src/components.rs:231:9 | 231 | return s; | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `-D clippy::needless-return` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_return)]` help: remove `return` | 231 - return s; 231 + s |
}
}

Expand Down
Loading