Skip to content

Commit

Permalink
chore: fix linting issues and use updated toolchain action
Browse files Browse the repository at this point in the history
  • Loading branch information
bittermandel committed Sep 25, 2024
1 parent 621664a commit 89f4606
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 39 deletions.
40 changes: 5 additions & 35 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,17 @@ jobs:
with:
version: "7.3.27"
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: clippy
components: clippy, rustfmt
- name: Setup buf
uses: bufbuild/[email protected]
- name: Setup protoc
run: sudo apt-get install protobuf-compiler
- name: Generate buf
run: cd crates/valv && buf generate
- name: Run Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings

fmt:
name: Rustfmt
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Setup buf
uses: bufbuild/[email protected]
- name: Setup protoc
run: sudo apt-get install protobuf-compiler
- name: Generate buf
run: cd crates/valv && buf generate
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo clippy --all -- -D warnings
- name: Run fmt
run: cargo fmt --all -- --check
8 changes: 4 additions & 4 deletions crates/valv/src/storage/fdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ impl ValvStorage for FoundationDB {

async fn update_key_version(
&self,
tenant: &str,
key_id: &str,
version_id: u32,
version: internal::KeyVersion,
_tenant: &str,
_key_id: &str,
_version_id: u32,
_version: internal::KeyVersion,
) -> anyhow::Result<()> {
todo!()
}
Expand Down
2 changes: 2 additions & 0 deletions crates/valv/src/storage/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub trait ValvStorage {
key_id: &str,
version_id: u32,
) -> anyhow::Result<internal::KeyVersion>;
#[allow(unused)]
async fn get_key_versions(
&self,
tenant: &str,
Expand All @@ -24,6 +25,7 @@ pub trait ValvStorage {
key: internal::Key,
key_version: internal::KeyVersion,
) -> anyhow::Result<()>;
#[allow(unused)]
async fn update_key_version(
&self,
tenant: &str,
Expand Down

0 comments on commit 89f4606

Please sign in to comment.