Skip to content

Commit

Permalink
chore: change code using rust
Browse files Browse the repository at this point in the history
  • Loading branch information
leon3s committed Nov 12, 2023
0 parents commit 92790f6
Show file tree
Hide file tree
Showing 8 changed files with 1,102 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Run Clippy

name: Clippy

on: [push, pull_request]

jobs:
clippy:
strategy:
fail-fast: true
runs-on: ubuntu-latest

steps:
- name: Checkout repository code
uses: actions/checkout@v3

# Cache Rust
- uses: actions/cache@v3
with:
path: ./target
key: ${{ hashFiles('./Cargo.lock') }}

# Cache Rust
- uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ hashFiles('./Cargo.lock') }}

- name: Install Rust with Clippy
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Run Clippy
run: cargo clippy
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"editor.rulers": [
80
],
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.trimAutoWhitespace": true,
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"rust-analyzer.showUnlinkedFileNotification": false,
"rust-analyzer.checkOnSave": true,
"rust-analyzer.check.command": "clippy",
"rust-analyzer.cargo.noDefaultFeatures": true,
}
Loading

0 comments on commit 92790f6

Please sign in to comment.