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

more clippy fixes #898

Merged
merged 1 commit into from
Jan 31, 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 @@ -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
Loading