Skip to content

Commit f1295c4

Browse files
bors[bot]burrbull
andauthored
Merge #709
709: clippy fix r=Emilgardis a=burrbull Co-authored-by: Andrey Zgarbul <[email protected]>
2 parents 6a9a0f5 + b46c23f commit f1295c4

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- { rust: stable, vendor: Toshiba, options: all }
7979
- { rust: stable, vendor: Toshiba, options: "" }
8080
# Test MSRV
81-
- { rust: 1.61.0, vendor: Nordic, options: "" }
81+
- { rust: 1.64.0, vendor: Nordic, options: "" }
8282
# Use nightly for architectures which don't support stable
8383
- { rust: nightly, vendor: MSP430, options: "--atomics" }
8484
- { rust: nightly, vendor: MSP430, options: "" }

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
9+
10+
- Bump MSRV to 1.64
911
- Fix dangling implicit derives
1012

1113
## [v0.28.0] - 2022-12-25

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ This project is developed and maintained by the [Tools team][team].
1313

1414
## Minimum Supported Rust Version (MSRV)
1515

16-
The **generated code** is guaranteed to compile on stable Rust 1.61.0 and up.
16+
The **generated code** is guaranteed to compile on stable Rust 1.64.0 and up.
1717

18-
If you encounter compilation errors on any stable version newer than 1.61.0, please open an issue.
18+
If you encounter compilation errors on any stable version newer than 1.64.0, please open an issue.
1919

2020
# Testing Locally
2121

src/generate/device.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
151151
let array_proxy = include_str!("array_proxy.rs");
152152
if config.generic_mod {
153153
let mut file = File::create(config.output_dir.join("generic.rs"))?;
154-
writeln!(file, "{}", generic_file)?;
154+
writeln!(file, "{generic_file}")?;
155155
if config.atomics {
156-
writeln!(file, "\n{}", generic_atomic_file)?;
156+
writeln!(file, "\n{generic_atomic_file}")?;
157157
}
158158
if config.const_generic {
159-
writeln!(file, "{}", array_proxy)?;
159+
writeln!(file, "{array_proxy}")?;
160160
}
161161

162162
if !config.make_mod {

src/generate/interrupt.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub fn render(
115115
match target {
116116
Target::CortexM => {
117117
for name in &names {
118-
writeln!(device_x, "PROVIDE({} = DefaultHandler);", name)?;
118+
writeln!(device_x, "PROVIDE({name} = DefaultHandler);")?;
119119
}
120120

121121
root.extend(quote! {
@@ -141,7 +141,7 @@ pub fn render(
141141
}
142142
Target::Msp430 => {
143143
for name in &names {
144-
writeln!(device_x, "PROVIDE({} = DefaultHandler);", name).unwrap();
144+
writeln!(device_x, "PROVIDE({name} = DefaultHandler);").unwrap();
145145
}
146146

147147
root.extend(quote! {
@@ -169,7 +169,7 @@ pub fn render(
169169
}
170170
Target::RISCV => {
171171
for name in &names {
172-
writeln!(device_x, "PROVIDE({} = DefaultHandler);", name)?;
172+
writeln!(device_x, "PROVIDE({name} = DefaultHandler);")?;
173173
}
174174

175175
root.extend(quote! {
@@ -194,7 +194,7 @@ pub fn render(
194194
}
195195
Target::XtensaLX => {
196196
for name in &names {
197-
writeln!(device_x, "PROVIDE({} = DefaultHandler);", name)?;
197+
writeln!(device_x, "PROVIDE({name} = DefaultHandler);")?;
198198
}
199199

200200
root.extend(quote! {

src/generate/register.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ pub fn render_register_mod(
318318

319319
let methods = methods
320320
.iter()
321-
.map(|s| format!("[`{0}`](crate::generic::Reg::{0})", s))
321+
.map(|s| format!("[`{s}`](crate::generic::Reg::{s})"))
322322
.collect::<Vec<_>>();
323323
let mut doc = format!("{description}\n\nThis register you can {}. See [API](https://docs.rs/svd2rust/#read--modify--write-api).", methods.join(", "));
324324

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ fn run() -> Result<()> {
223223
]
224224
.contains(&config.target)
225225
{
226-
writeln!(File::create(path.join("device.x"))?, "{}", device_x)?;
226+
writeln!(File::create(path.join("device.x"))?, "{device_x}")?;
227227
writeln!(File::create(path.join("build.rs"))?, "{}", build_rs())?;
228228
}
229229

0 commit comments

Comments
 (0)