Skip to content

Commit fc6a734

Browse files
committed
Clippy, edition = "2024"
1 parent aba9454 commit fc6a734

File tree

19 files changed

+31
-32
lines changed

19 files changed

+31
-32
lines changed

.github/workflows/rust.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ jobs:
5555
with:
5656
toolchain: stable
5757

58-
- uses: Swatinem/rust-cache@v2
59-
6058
- name: Compile project
6159
run: cargo build --bench template-benchmark --release
6260

@@ -74,8 +72,6 @@ jobs:
7472
toolchain: stable
7573
components: clippy
7674

77-
- uses: Swatinem/rust-cache@v2
78-
7975
- name: clippy
8076
run: cargo clippy -- -D warnings
8177

@@ -132,8 +128,6 @@ jobs:
132128
with:
133129
toolchain: stable
134130

135-
- uses: Swatinem/rust-cache@v2
136-
137131
- name: Remove any stale results
138132
run: rm -rf target/criterion
139133

.rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
edition = "2021"
1+
edition = "2024"
22
group_imports = "StdExternalCrate"
33
imports_granularity = "Module"
44
newline_style = "Unix"

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ members = [
1212
"tmpls/tera",
1313
"tmpls/tinytemplate",
1414
]
15-
resolver = "2"
15+
resolver = "3"
1616

1717
[package]
1818
name = "template-benchmark"
1919
version = "0.1.0"
20-
edition = "2021"
20+
edition = "2024"
2121
publish = false
2222
license = "Apache-2.0"
2323

@@ -61,15 +61,15 @@ tera = { version = "*", optional = true, path = "tmpls/tera", package = "tmpl-te
6161
tinytemplate = { version = "*", optional = true, path = "tmpls/tinytemplate", package = "tmpl-tinytemplate" }
6262
vy = { version = "*", optional = true, path = "tmpls/vy", package = "tmpl-vy" }
6363

64-
ahash = { version = "0.8.11", features = ["no-rng"] }
65-
criterion = { version = "0.5.1", features = ["html_reports"] }
66-
pretty-error-debug = "0.3.1"
67-
thiserror = "2.0.12"
64+
ahash = { version = "0.8", features = ["no-rng"] }
65+
criterion = { version = "0.5", features = ["html_reports"] }
66+
pretty-error-debug = "0.3"
67+
thiserror = "2"
6868

6969
[build-dependencies]
7070
pretty-error-debug = "0.3"
71-
self_cell = "1.2.0"
72-
thiserror = "2.0.12"
71+
self_cell = "1"
72+
thiserror = "2"
7373

7474
[[bench]]
7575
name = "template-benchmark"

build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
#![allow(clippy::uninlined_format_args)] // I don't care
2+
13
use std::ffi::{OsStr, OsString};
24
use std::process::{Command, Stdio};
35

46
fn main() -> Result<(), Error> {
5-
println!("cargo:rerun-if-changed=Cargo.lock");
7+
println!("cargo::rerun-if-changed=build.rs");
8+
println!("cargo::rerun-if-changed=Cargo.lock");
69

710
let cargo = var_os("CARGO")?;
811
let root = var_os("CARGO_MANIFEST_DIR")?;
@@ -55,6 +58,7 @@ fn cargo_tree(cargo: &OsStr, root: &OsStr, package: &str) -> Result<CargoTreeOut
5558
"--depth=1",
5659
"--charset=ascii",
5760
"--all-features",
61+
"--color=never",
5862
"--package",
5963
package,
6064
])
@@ -69,6 +73,7 @@ fn cargo_tree(cargo: &OsStr, root: &OsStr, package: &str) -> Result<CargoTreeOut
6973
if !output.status.success() {
7074
return Err(Error::Status(output.status));
7175
}
76+
let _ = dbg!((cargo, root, package, std::str::from_utf8(&output.stdout)));
7277

7378
Ok(CargoTreeOutput::new(
7479
String::from_utf8(output.stdout).map_err(|_| Error::Utf8)?,

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ fn tmpl<B: Benchmark>(case: Case) -> Result<(), Error> {
125125
result.map_err(|err| Error::Execution(Box::new(err)))?;
126126

127127
let bytes = from_utf8(output.as_bytes()).map_err(Error::Utf8)?;
128-
println!("{}", bytes);
128+
println!("{bytes}");
129129

130130
Ok(())
131131
}

tmpls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tmpls"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

tmpls/askama/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tmpl-askama"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

tmpls/askama_git/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tmpl-askama_git"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

tmpls/handlebars/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tmpl-handlebars"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

tmpls/horrorshow/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tmpl-horrorshow"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

0 commit comments

Comments
 (0)