Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lifetime ellision for FieldWriter to fix clippy warning #897

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
## [Unreleased]

- Force using rust edition 2021 in CI
- Added lifetime ellision for `FieldWriter` where the explicit lifetimes are not necessary, which
fixes the `clippy::needless_lifetimes` warning on rustc 1.84

## [v0.35.0] - 2024-11-12

Expand Down
2 changes: 1 addition & 1 deletion ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ main() {
test_patched_stm32 stm32f103
test_patched_stm32 stm32f411
test_patched_stm32 stm32f469
test_patched_stm32 stm32f7x3
test_patched_stm32 stm32f723
test_patched_stm32 stm32g070
test_patched_stm32 stm32g473
test_patched_stm32 stm32h743
Expand Down
4 changes: 2 additions & 2 deletions ci/svd2rust-regress/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1863,8 +1863,8 @@
svd_url: https://stm32-rs.github.io/stm32-rs/stm32f469.svd.patched
- arch: cortex-m
mfgr: STMicro
chip: STM32F7x3
svd_url: https://stm32-rs.github.io/stm32-rs/stm32f7x3.svd.patched
chip: STM32F723
svd_url: https://stm32-rs.github.io/stm32-rs/stm32f723.svd.patched
Emilgardis marked this conversation as resolved.
Show resolved Hide resolved
- arch: cortex-m
mfgr: STMicro
chip: STM32G070
Expand Down
2 changes: 1 addition & 1 deletion src/generate/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ pub struct RangeTo<const MAX: u64>;
/// Write field Proxy
pub type FieldWriter<'a, REG, const WI: u8, FI = u8, Safety = Unsafe> = raw::FieldWriter<'a, REG, WI, FI, Safety>;

impl<'a, REG, const WI: u8, FI, Safety> FieldWriter<'a, REG, WI, FI, Safety>
impl<REG, const WI: u8, FI, Safety> FieldWriter<'_, REG, WI, FI, Safety>
where
REG: Writable + RegisterSpec,
FI: FieldSpec,
Expand Down
Loading