Skip to content

Commit

Permalink
added clippy (#12)
Browse files Browse the repository at this point in the history
* linter

* fix clippy issues

* fix clippy issues
  • Loading branch information
malik672 authored Feb 22, 2024
1 parent e5dd078 commit 4601040
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
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;
}

0 comments on commit 4601040

Please sign in to comment.