Merge pull request #293 from taskchampion/cargo-fmt

add a cargo-fmt job to CI
This commit is contained in:
Dustin J. Mitchell
2021-10-02 22:16:06 -04:00
committed by GitHub
2 changed files with 22 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ jobs:
name: "Clippy"
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/cache@v2
@@ -51,7 +51,7 @@ jobs:
name: "Documentation"
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
@@ -81,3 +81,22 @@ jobs:
- run: mdbook test docs
- run: mdbook build docs
fmt:
runs-on: ubuntu-latest
name: "Formatting"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

View File

@@ -1,5 +1,5 @@
use anyhow::{anyhow, bail, Result};
use toml::value::Table;
use toml::value::{Table};
/// Check that the input is a table and contains no keys not in the given list, returning
/// the table.