diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index db48f90..f64a4f0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: env: RUST_BACKTRACE: full steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install rust-${{ matrix.channel }} uses: actions-rs/toolchain@v1 with: @@ -34,12 +34,12 @@ jobs: profile: minimal override: true - name: Cache cargo registry - uses: actions/cache@v2 + uses: actions/cache@v4 continue-on-error: true with: path: | - ~/.cargo/registry - ~/.cargo/git + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ key: ${{ runner.os }}-cargo-${{ matrix.channel }} restore-keys: | ${{ runner.os }}-cargo-${{ matrix.channel }} @@ -131,7 +131,15 @@ jobs: with: command: update args: --package num-traits --precise 0.2.18 - - name: Check formatting + - name: Setup Taplo + if: matrix.lint + uses: uncenter/setup-taplo@v1 + with: + version: "0.8.1" + - name: Check Cargo.toml formatting + if: matrix.lint + run: taplo fmt --check --diff + - name: Check sourcecode formatting if: matrix.lint uses: actions-rs/cargo@v1 with: diff --git a/.taplo.toml b/.taplo.toml new file mode 100644 index 0000000..9f967cb --- /dev/null +++ b/.taplo.toml @@ -0,0 +1,4 @@ +include = [".taplo.toml", "Cargo.toml"] + +[formatting] +indent_string = " " diff --git a/Cargo.toml b/Cargo.toml index 654eba1..8fe42cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,14 +13,14 @@ categories = ["api-bindings", "os::windows-apis"] [dependencies] cfg-if = "1.0" -windows-sys = {version = "0.48", features = [ +windows-sys = { version = "0.48", features = [ "Win32_Foundation", "Win32_System_Time", "Win32_System_Registry", "Win32_Security", "Win32_Storage_FileSystem", - "Win32_System_Diagnostics_Debug" -]} + "Win32_System_Diagnostics_Debug", +] } chrono = { version = "0.4.6", optional = true } serde = { version = "1", optional = true }