Skip to content

Commit

Permalink
more clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jan 31, 2025
1 parent c94dc77 commit 40dc8ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- Added lifetime ellision for `FieldWriter` where the explicit lifetimes are not necessary, which
fixes the `clippy::needless_lifetimes` warning on rustc 1.84
- Some fixes for the `svd2rust-regress` tool and update of its documentation
- Other internal clippy fixes for `clippy::manual_div_ceil`, `clippy::nonminimal_bool` and
`clippy::needless_lifetimes`

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

Expand Down
2 changes: 1 addition & 1 deletion ci/svd2rust-regress/src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fn find_executable(dir: &Path, begins: &str) -> Result<Option<PathBuf>, anyhow::
.path()
.extension()
.is_some_and(|s| s == std::env::consts::EXE_EXTENSION))
&& !entry.path().extension().is_some_and(|s| s == "gz")
&& entry.path().extension().is_none_or(|s| s != "gz")
{
Ok(Some(entry.path()))
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/generate/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ impl FieldRegions {
let mut indices = Vec::new();

let rbf_start = rbf.offset;
let rbf_end = rbf_start + (rbf.size + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
let rbf_end = rbf_start + rbf.size.div_ceil(BITS_PER_BYTE);

// The region that we're going to insert
let mut new_region = Region {
Expand Down
2 changes: 1 addition & 1 deletion src/generate/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ pub enum EV<'a> {
Derived(&'a EnumeratedValues, &'a EnumPath),
}

impl<'a> EV<'a> {
impl EV<'_> {
fn values(&self) -> &EnumeratedValues {
match self {
Self::New(e) | Self::Derived(e, _) => e,
Expand Down

0 comments on commit 40dc8ca

Please sign in to comment.