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

added clippy #12

Merged
merged 3 commits into from
Feb 22, 2024
Merged
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
44 changes: 44 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: lint

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main]

jobs:
fmt:
name: fmt
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
- name: git submodule update
run: git submodule update --init --recursive
- name: cargo fmt
run: cargo +nightly fmt --all -- --check

clippy:
name: clippy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- name: git submodule update
run: git submodule update --init --recursive
- name: cargo clippy
run: cargo clippy --workspace --all-features -- -D warnings


2 changes: 1 addition & 1 deletion src/behaviors/deployer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl Behavior<()> for Deployer {
pool,
};

messager
let _ = messager
.send(To::All, serde_json::to_string(&deployment_data)?)
.await;

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ async fn main() {
let deployer = Agent::builder("deployer").with_behavior(Deployer);

world.add_agent(deployer);
world.run().await;
let _ = world.run().await;
}
Loading