Skip to content

Commit ac8c053

Browse files
committed
consolidate workspace settings
* Ensure all crates are consistently configured and validated using workspace features * move edition, license, repo, and rust-version (where used) to workspace * remove readme setting (already set by default) * add lints section - this should be used in a separate PR
1 parent 657c50b commit ac8c053

File tree

54 files changed

+327
-210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+327
-210
lines changed

Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ members = [
88
"boards/*",
99
]
1010

11+
[workspace.package]
12+
edition = "2021"
13+
license = "MIT OR Apache-2.0"
14+
repository = "https://github.com/atsamd-rs/atsamd"
15+
rust-version = "1.77.2"
16+
17+
[workspace.lints.rust]
18+
# TODO: add any workspace-wide rust lint configurations
19+
# TODO: enable to make identifier usage consistent per file
20+
# unused_qualifications = "warn"
21+
22+
[workspace.lints.clippy]
23+
# TODO: add any workspace-wide clippy lint configurations
24+
1125
[profile.dev]
1226
debug = true
1327
opt-level = 0

atsamd-hal-macros/Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
[package]
22
authors = ["Tethys Svensson"]
33
name = "atsamd-hal-macros"
4-
rust-version = "1.77.2"
4+
rust-version.workspace = true
55
version = "0.2.4"
6-
edition = "2021"
7-
license = "MIT OR Apache-2.0"
86
categories = ["embedded", "hardware-support", "no-std"]
97
description = "Procedural macros for the atsamd-hal library"
108
documentation = "https://docs.rs/crate/atsamd-hal-macros/"
11-
repository = "https://github.com/atsamd-rs/atsamd"
9+
edition.workspace = true
10+
license.workspace = true
11+
repository.workspace = true
12+
13+
[lints]
14+
workspace = true
1215

1316
[lib]
1417
proc-macro = true

atsamd-hal-macros/src/parsing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub enum HalExpr {
111111
All(Vec<HalExpr>),
112112
Any(Vec<HalExpr>),
113113
Not(Box<HalExpr>),
114-
Peripheral(std::borrow::Cow<'static, str>),
114+
Peripheral(Cow<'static, str>),
115115
}
116116

117117
pub fn eat_hal_expr(expr: &mut impl Iterator<Item = TokenTree>) -> Result<HalExpr, Error> {

boards/arduino_mkr1000/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ authors = ["Eric Rushing <[email protected]>"]
55
description = "Board Support crate for the Arduino MKR 1000 WiFi"
66
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
77
categories = ["embedded", "hardware-support", "no-std"]
8-
license = "MIT OR Apache-2.0"
9-
repository = "https://github.com/atsamd-rs/atsamd"
10-
readme = "README.md"
11-
edition = "2021"
8+
edition.workspace = true
9+
license.workspace = true
10+
repository.workspace = true
11+
12+
[lints]
13+
workspace = true
1214

1315
[dependencies.cortex-m-rt]
1416
version = "0.7"

boards/arduino_mkrvidor4000/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ authors = ["Sameer Puri <[email protected]>"]
55
description = "Board Support crate for the Arduino MKR VIDOR 4000"
66
keywords = ["no-std", "arm", "cortex-m", "embedded-hal", "arduino"]
77
categories = ["embedded", "hardware-support", "no-std"]
8-
license = "MIT OR Apache-2.0"
9-
repository = "https://github.com/atsamd-rs/atsamd"
10-
readme = "README.md"
11-
edition = "2021"
8+
edition.workspace = true
9+
license.workspace = true
10+
repository.workspace = true
11+
12+
[lints]
13+
workspace = true
1214

1315
[dependencies.cortex-m-rt]
1416
version = "0.7"

boards/arduino_mkrzero/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ authors = ["Wez Furlong <[email protected]>", "David McGillicuddy <contact@djmc
55
description = "Board Support crate for the Arduino MKRZERO"
66
keywords = ["no-std", "arm", "cortex-m", "embedded-hal", "arduino"]
77
categories = ["embedded", "hardware-support", "no-std"]
8-
license = "MIT OR Apache-2.0"
9-
repository = "https://github.com/atsamd-rs/atsamd"
10-
readme = "README.md"
11-
edition = "2021"
8+
edition.workspace = true
9+
license.workspace = true
10+
repository.workspace = true
11+
12+
[lints]
13+
workspace = true
1214

1315
[dependencies.cortex-m-rt]
1416
version = "0.7"

boards/arduino_nano33iot/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ authors = ["Gus Wynn <[email protected]>"]
55
description = "Board Support crate for the Arduino Nano 33 IOT"
66
keywords = ["no-std", "arm", "cortex-m", "embedded-hal", "arduino"]
77
categories = ["embedded", "hardware-support", "no-std"]
8-
license = "MIT OR Apache-2.0"
9-
repository = "https://github.com/atsamd-rs/atsamd"
10-
readme = "README.md"
11-
edition = "2021"
8+
edition.workspace = true
9+
license.workspace = true
10+
repository.workspace = true
11+
12+
[lints]
13+
workspace = true
1214

1315
[dependencies.cortex-m-rt]
1416
version = "0.7"

boards/atsame54_xpro/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ authors = [
55
]
66
categories = ["embedded", "hardware-support", "no-std"]
77
description = "Board Support crate for the SAM E54 Xplained Pro Evaluation Kit"
8-
edition = "2021"
98
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
10-
license = "MIT OR Apache-2.0"
119
name = "atsame54_xpro"
12-
readme = "README.md"
13-
repository = "https://github.com/atsamd-rs/atsamd"
1410
version = "0.11.3"
11+
edition.workspace = true
12+
license.workspace = true
13+
repository.workspace = true
14+
15+
[lints]
16+
workspace = true
1517

1618
[dependencies.cortex-m-rt]
1719
optional = true

boards/circuit_playground_express/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ version = "0.11.1"
44
authors = ["Paul Sajna <[email protected]>"]
55
description = "Board Support crate for the Adafruit Circuit Playground Express"
66
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
7-
license = "MIT OR Apache-2.0"
8-
repository = "https://github.com/atsamd-rs/atsamd"
9-
readme = "README.md"
107
edition = "2018"
8+
license.workspace = true
9+
repository.workspace = true
10+
11+
[lints]
12+
workspace = true
1113

1214
[dependencies.cortex-m-rt]
1315
version = "0.7"

boards/edgebadge/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ authors = ["Jacob Rosenthal <@jacobrosenthal>"]
55
description = "Board Support crate for the Adafruit EdgeBadge"
66
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
77
categories = ["embedded", "hardware-support", "no-std"]
8-
license = "MIT OR Apache-2.0"
9-
repository = "https://github.com/atsamd-rs/atsamd"
10-
readme = "README.md"
11-
edition = "2021"
128
exclude = ["assets"]
9+
edition.workspace = true
10+
license.workspace = true
11+
repository.workspace = true
12+
13+
[lints]
14+
workspace = true
1315

1416
[dependencies]
1517
cortex-m = "0.7"

0 commit comments

Comments
 (0)