Skip to content

Commit ad996a0

Browse files
committed
Validate TOML files
1 parent 206889e commit ad996a0

4 files changed

Lines changed: 43 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,39 @@ env:
99

1010
jobs:
1111
clippy:
12-
name: Clippy & Format
12+
name: Clippy
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
1616
- uses: dtolnay/rust-toolchain@stable
1717
with:
18-
components: clippy, rustfmt
18+
components: clippy
1919
- uses: Swatinem/rust-cache@v2
2020
- name: Run Clippy
2121
run: cargo clippy --all-features -- -D warnings
2222

23+
rustfmt:
24+
name: Format
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dtolnay/rust-toolchain@stable
29+
with:
30+
components: rustfmt
31+
- name: Run Rustfmt
32+
run: cargo fmt --check
33+
34+
tombi:
35+
name: Validate TOML
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: tombi-toml/setup-tombi@v1
40+
- name: Validate TOML files
41+
run: tombi lint
42+
- name: Format TOML files
43+
run: tombi format --check
44+
2345
test:
2446
name: Test Suite
2547
runs-on: ubuntu-latest

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
"bin-proto",
45
"bin-proto-derive",
56
]
6-
resolver = "2"

bin-proto-derive/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ edition = "2021"
55
rust-version = "1.84.0"
66

77
description = "Derive macros for bin-proto"
8-
license = "MIT"
8+
documentation = "https://docs.rs/bin-proto"
99
readme = "../README.md"
1010
repository = "https://github.com/wojciech-graj/bin-proto"
11-
documentation = "https://docs.rs/bin-proto"
12-
keywords = ["binary", "encode", "decode", "serialize", "deserialize"]
13-
categories = ["encoding", "parsing", "no-std::no-alloc"]
11+
license = "MIT"
12+
keywords = ["binary", "decode", "deserialize", "encode", "serialize"]
13+
categories = ["encoding", "no-std::no-alloc", "parsing"]
1414

1515
[lib]
1616
proc-macro = true
1717

1818
[dependencies]
19-
syn = { version = "2.0.32", features = ["full"] }
20-
quote = "1.0.0"
2119
proc-macro2 = "1.0.0"
20+
quote = "1.0.0"
21+
syn = { version = "2.0.32", features = ["full"] }

bin-proto/Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ edition = "2021"
55
rust-version = "1.84.0"
66

77
description = "Conversion to/from binary for arbitrary types"
8-
license = "MIT"
8+
documentation = "https://docs.rs/bin-proto"
99
readme = "../README.md"
1010
repository = "https://github.com/wojciech-graj/bin-proto"
11-
documentation = "https://docs.rs/bin-proto"
12-
keywords = ["binary", "encode", "decode", "serialize", "deserialize"]
13-
categories = ["encoding", "parsing", "no-std::no-alloc"]
11+
license = "MIT"
12+
keywords = ["binary", "decode", "deserialize", "encode", "serialize"]
13+
categories = ["encoding", "no-std::no-alloc", "parsing"]
1414

1515
[package.metadata.docs.rs]
1616
all-features = true
1717
rustdoc-args = ["--cfg", "docsrs"]
1818

19-
[features]
20-
alloc = ["bitstream-io/alloc", "core2/alloc"]
21-
default = ["alloc", "derive", "std"]
22-
derive = ["dep:bin-proto-derive"]
23-
prepend-tags = []
24-
std = ["bitstream-io/std", "core2/std", "alloc"]
25-
2619
[dependencies]
27-
bin-proto-derive = { version = "0.12.2", path = "../bin-proto-derive", optional = true }
20+
bin-proto-derive = { path = "../bin-proto-derive", version = "0.12.2", optional = true }
2821
bitstream-io = { version = "4.6.0", default-features = false }
2922
core2 = { version = "0.4.0", default-features = false }
3023

3124
[dev-dependencies]
3225
proptest = "1.8.0"
26+
27+
[features]
28+
default = ["alloc", "derive", "std"]
29+
alloc = ["bitstream-io/alloc", "core2/alloc"]
30+
derive = ["dep:bin-proto-derive"]
31+
prepend-tags = []
32+
std = ["alloc", "bitstream-io/std", "core2/std"]

0 commit comments

Comments
 (0)