Skip to content

Commit

Permalink
update to Rust Edition 2021
Browse files Browse the repository at this point in the history
this does not involve any code changes, it just sets the new edition,
allowing to use newer features in the future.

as the crate is anyway only compiling with a recent nightly compiler
there's no problem with requiring edition 2021 (it was first introduced
in Rust 1.56).

note that running `cargo fix --edition` (as suggested by the [migration
guide]) isn't possible as workspace-level cargo commands fail in this
repository due to the feature flags :(

the resolver has been specified in the workspace due to the following
build warning being issued if it's not present:

> warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
> note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
> note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest

[migration guide]: https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html
  • Loading branch information
rursprung authored and Rahix committed Dec 28, 2023
1 parent cca5972 commit f6b79dc
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ exclude = [
# The RAVEDUDE! Yeah!
"ravedude",
]
resolver = "2"
2 changes: 1 addition & 1 deletion arduino-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "arduino-hal"
version = "0.1.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"

[features]
default = ["rt"]
Expand Down
2 changes: 1 addition & 1 deletion avr-hal-generic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "avr-hal-generic"
version = "0.1.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
cfg-if = "0.1.7"
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino-diecimila/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "arduino-diecimila-examples"
version = "0.0.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino-leonardo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "arduino-leonardo-examples"
version = "0.0.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino-mega1280/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "arduino-mega1280-examples"
version = "0.0.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino-mega2560/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "arduino-mega2560-examples"
version = "0.0.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino-nano/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "arduino-nano-examples"
version = "0.0.0"
authors = ["David R. Morrison <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino-uno/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "arduino-uno-examples"
version = "0.0.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/nano168/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "nano168-examples"
description = "Examples for the arduino clones with Atmega168 chip"
version = "0.0.0"
authors = ["David R. Morrison <[email protected]>", "Franz Dietrich <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/sparkfun-promicro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "sparkfun-promicro-examples"
version = "0.0.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/sparkfun-promini-5v/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "sparkfun-promini-5v-examples"
version = "0.0.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/trinket-pro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "trinket-pro-examples"
version = "0.0.0"
authors = ["Gaute Hope <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/trinket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "trinket-examples"
version = "0.0.0"
authors = ["Jan Paw <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion mcu/atmega-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "atmega-hal"
version = "0.1.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"

[features]
rt = ["avr-device/rt"]
Expand Down
2 changes: 1 addition & 1 deletion mcu/attiny-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "attiny-hal"
version = "0.1.0"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"

[features]
rt = ["avr-device/rt"]
Expand Down
2 changes: 1 addition & 1 deletion ravedude/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "ravedude"
version = "0.1.6"
authors = ["Rahix <[email protected]>"]
edition = "2018"
edition = "2021"
description = "Tool to easily flash code onto an AVR microcontroller with avrdude"
readme = "README.md"
repository = "https://github.com/Rahix/avr-hal/tree/main/ravedude"
Expand Down

0 comments on commit f6b79dc

Please sign in to comment.