Skip to content

Commit a37765e

Browse files
authored
Merge pull request #1 from ChainSafe/willem/rust-builds-in-ci
Add rust fmt, clippy and check running in CI
2 parents 5b57fbc + 0294577 commit a37765e

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

.github/workflows/rust-checks.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Rust-Checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: main
7+
8+
jobs:
9+
fmt:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Install Rust toolchain
16+
uses: ./.github/actions/install-rust-toolchain
17+
with:
18+
components: rustfmt
19+
20+
- uses: actions-rs/cargo@v1
21+
with:
22+
command: fmt
23+
args: --all -- --check
24+
25+
clippy:
26+
runs-on: ubuntu-24.04
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
31+
- name: Install Rust toolchain
32+
uses: ./.github/actions/install-rust-toolchain
33+
with:
34+
components: clippy
35+
36+
- uses: actions-rs/cargo@v1
37+
with:
38+
command: clippy
39+
args: --all --all-targets -- -D warnings

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0, MIT
33

44
//! This is the top level documentation!
5+
#![allow(async_fn_in_trait)]
56

67
pub mod account;
78
pub mod error;

src/store/injected_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright 2024 ChainSafe Systems
22
// SPDX-License-Identifier: Apache-2.0, MIT
33

4-
use crate::store::WalletStore;
54
use crate::error::Error;
5+
use crate::store::WalletStore;
66
use wasm_bindgen::prelude::*;
77

88
#[wasm_bindgen(typescript_custom_section)]

src/store/memory_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright 2024 ChainSafe Systems
22
// SPDX-License-Identifier: Apache-2.0, MIT
33

4-
use crate::store::WalletStore;
54
use crate::error::Error;
5+
use crate::store::WalletStore;
66

77
/// A simple in-memory store for wallet data. Useful for testing
88
pub struct MemoryStore {

tests/web_accounts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ use webz_core::account::Account;
66
#[wasm_bindgen_test]
77
fn test_account_from_seed() {
88
let seed = [0; 32];
9-
let a = Account::from_seed(&seed, 0).unwrap();
9+
let _a = Account::from_seed(&seed, 0).unwrap();
1010
}

0 commit comments

Comments
 (0)