Skip to content

Commit abb0a2d

Browse files
committed
ci: sort elements in Cargo.toml
1 parent d5a4f9c commit abb0a2d

File tree

10 files changed

+41
-14
lines changed

10 files changed

+41
-14
lines changed

.github/workflows/rust.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
cd "$PKG"
7171
echo "Testing: $PKG"
7272
cargo fmt -- --check
73-
cd -
73+
cd - > /dev/null
7474
done
7575
7676
MSRV:
@@ -114,3 +114,22 @@ jobs:
114114
uses: github/codeql-action/upload-sarif@v3
115115
with:
116116
sarif_file: devskim-results.sarif
117+
118+
CargoSort:
119+
name: Check order in Cargo.toml
120+
runs-on: ubuntu-latest
121+
steps:
122+
- uses: actions/checkout@v4
123+
- uses: taiki-e/install-action@v2
124+
with:
125+
tool: cargo-sort
126+
- run: |
127+
set -eu
128+
for PKG in \
129+
rinja rinja_actix rinja_axum rinja_derive rinja_derive_standalone \
130+
rinja_parser rinja_rocket rinja_warp testing
131+
do
132+
cd "$PKG"
133+
cargo sort --check --check-format --grouped
134+
cd - > /dev/null
135+
done

rinja/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ readme = "../README.md"
1313
edition = "2021"
1414
rust-version = "1.71"
1515

16+
[package.metadata.docs.rs]
17+
features = ["default", "serde_json"]
18+
rustdoc-args = ["--generate-link-to-definition", "--cfg=docsrs"]
19+
1620
[badges]
1721
maintenance = { status = "actively-developed" }
1822

@@ -34,14 +38,14 @@ with-warp = ["rinja_derive/with-warp"]
3438
[dependencies]
3539
rinja_derive = { version = "=0.3.0", path = "../rinja_derive" }
3640

37-
itoa = "1.0.11"
38-
3941
humansize = { version = "2", optional = true }
4042
num-traits = { version = "0.2.6", optional = true }
4143
percent-encoding = { version = "2.1.0", optional = true }
4244
serde = { version = "1.0", optional = true }
4345
serde_json = { version = "1.0", optional = true }
4446

47+
itoa = "1.0.11"
48+
4549
[dev-dependencies]
4650
criterion = "0.5"
4751

@@ -53,7 +57,3 @@ required-features = ["serde_json"]
5357
[[bench]]
5458
name = "escape"
5559
harness = false
56-
57-
[package.metadata.docs.rs]
58-
features = ["default", "serde_json"]
59-
rustdoc-args = ["--generate-link-to-definition", "--cfg=docsrs"]

rinja_actix/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rust-version = "1.71"
1414

1515
[dependencies]
1616
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-actix-web"] }
17+
1718
actix-web = { version = "4", default-features = false }
1819

1920
[dev-dependencies]

rinja_axum/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ readme = "README.md"
1414

1515
[dependencies]
1616
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-axum"] }
17+
1718
axum-core = "0.4"
1819
http = "1.0"
1920

rinja_derive/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@ with-warp = []
2828
parser = { package = "rinja_parser", version = "=0.3.0", path = "../rinja_parser" }
2929

3030
basic-toml = { version = "0.1.1", optional = true }
31+
serde = { version = "1.0", optional = true, features = ["derive"] }
32+
3133
memchr = "2"
3234
mime = "0.3"
3335
mime_guess = "2"
3436
once_map = "0.4.18"
3537
proc-macro2 = "1"
3638
quote = "1"
37-
serde = { version = "1.0", optional = true, features = ["derive"] }
3839
syn = "2.0.3"
3940

4041
[dev-dependencies]
4142
console = "0.15.8"
42-
similar = "2.6.0"
4343
prettyplease = "0.2.20"
44+
similar = "2.6.0"
4445
syn = { version = "2.0.3", features = ["full"] }
4546

4647
[lints.rust]

rinja_derive_standalone/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ with-warp = []
2727
parser = { package = "rinja_parser", version = "=0.3.0", path = "../rinja_parser" }
2828

2929
basic-toml = { version = "0.1.1", optional = true }
30+
serde = { version = "1.0", optional = true, features = ["derive"] }
31+
3032
memchr = "2"
3133
mime = "0.3"
3234
mime_guess = "2"
3335
once_map = "0.4.18"
3436
proc-macro2 = "1"
3537
quote = "1"
36-
serde = { version = "1.0", optional = true, features = ["derive"] }
3738
syn = "2"
3839

3940
[dev-dependencies]
40-
criterion = "0.5"
41-
4241
console = "0.15.8"
43-
similar = "2.6.0"
42+
criterion = "0.5"
4443
prettyplease = "0.2.20"
44+
similar = "2.6.0"
4545
syn = { version = "2.0.3", features = ["full"] }
4646

4747
[[bench]]

rinja_rocket/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rust-version = "1.71"
1414

1515
[dependencies]
1616
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-rocket"] }
17+
1718
rocket = { version = "0.5", default-features = false }
1819

1920
[dev-dependencies]

rinja_warp/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rust-version = "1.71"
1414

1515
[dependencies]
1616
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-warp"] }
17+
1718
warp = { version = "0.3", default-features = false }
1819

1920
[dev-dependencies]

testing/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ serde_json = ["dep:serde_json", "rinja/serde_json"]
1313

1414
[dependencies]
1515
rinja = { path = "../rinja", version = "0.3.0" }
16+
1617
serde_json = { version = "1.0", optional = true }
1718

1819
[dev-dependencies]
1920
rinja = { path = "../rinja", version = "0.3.0", features = ["serde_json"] }
21+
2022
criterion = "0.5"
21-
phf = { version = "0.11", features = ["macros" ]}
23+
phf = { version = "0.11", features = ["macros" ] }
2224
trybuild = "1.0.76"
2325

2426
[[bench]]

tomlfmt.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
table_order = ["workspace", "package", "badges", "lib", "features", "dependencies", "build-dependencies", "dev-dependencies", "bench"]

0 commit comments

Comments
 (0)