Skip to content

Commit 9b315fb

Browse files
chore(template): Bump Rust to 1.85.0 (#495)
* chore(template): Bump rust to 1.85.0 * chore(template): Add vscode settings for rustfmt * chore(template): Use Rust 2024 style * chore(template): Add additional rustfmt settings used in operator-rs * Apply suggestions from code review Co-authored-by: Techassi <git@techassi.dev> * chore(template): Jinja it up * chore(template): Additional commit --------- Co-authored-by: Techassi <git@techassi.dev>
1 parent dbc3928 commit 9b315fb

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

config/versions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# IMPORTANT
33
# If you change the Rust toolchain version here, make sure to also change
44
# docker-images/ubi8-rust-builder/Dockerfile & docker-images/ubi9-rust-builder/Dockerfile
5-
rust_version: 1.84.1
5+
rust_version: 1.85.0
66

77
# This nightly version is only used for cargo fmt invocations, because we use nightly-only
88
# rustfmt config options in rustfmt.toml. The version should be kept in line with the version

template/.vscode/settings.json.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"rust-analyzer.rustfmt.overrideCommand": [
3+
"rustfmt",
4+
"+{[rust_nightly_version}]",
5+
"--"
6+
],
7+
}

template/rustfmt.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# This file includes unstable features, so you need to run "cargo +nightly fmt" to format your code.
22
# It's also ok to use the stable toolchain by simple running "cargo fmt", but using the nigthly formatter is prefered.
33

4+
# https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rustfmt-style-edition.html
5+
style_edition = "2024"
46
imports_granularity = "Crate"
5-
group_imports = "StdExternalCrate"
7+
group_imports = "StdExternalCrate"
8+
reorder_impl_items = true
9+
use_field_init_shorthand = true

0 commit comments

Comments
 (0)