diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..99e8b1a --- /dev/null +++ b/.github/workflows/lint.yml @@ -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 + + \ No newline at end of file diff --git a/src/behaviors/deployer.rs b/src/behaviors/deployer.rs index 727ea0f..67882ed 100644 --- a/src/behaviors/deployer.rs +++ b/src/behaviors/deployer.rs @@ -68,7 +68,7 @@ impl Behavior<()> for Deployer { pool, }; - messager + let _ = messager .send(To::All, serde_json::to_string(&deployment_data)?) .await; diff --git a/src/main.rs b/src/main.rs index 0ab4d9a..0d778d6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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; }