Skip to content

Various warning fixes#198

Merged
noahbald merged 7 commits intonoahbald:mainfrom
gwen-lg:various_fixes
Dec 9, 2025
Merged

Various warning fixes#198
noahbald merged 7 commits intonoahbald:mainfrom
gwen-lg:various_fixes

Conversation

@gwen-lg
Copy link
Contributor

@gwen-lg gwen-lg commented Nov 25, 2025

Description

fixe some warning from rustc and clippy

Motivation and Context

clean the code and part of work for avoid failed jobs reported by check workflow :
https://github.com/noahbald/oxvg/actions/runs/19668140313/job/56330008578

How Has This Been Tested?

cargo check/clippy + CI

Types of changes

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

tendril::TendrilSink,
};
#[cfg(test)]
mod tests {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is mod-ing tests part of clippy? I can't see it in the check's errors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not remember, but to avoid have test code in library, test function are encapsulated in module enabled only on cfg(test)

@noahbald
Copy link
Owner

Thanks Gwen for the cleanup, you've been super helpful!

@noahbald
Copy link
Owner

Don't worry about the deprecated warnings, I still want them for this release but they will be removed in the next

warning: hiding a lifetime that's elided elsewhere is confusing
help: the same lifetime is referred to in inconsistent ways, making the signature confusing
warning: consider adding a `;` to the last statement for consistent formatting
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#semicolon_if_nothing_returned
warning: the following explicit lifetimes could be elided: 'i
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#elidable_lifetime_names
clippy lint msg: manual implementation of `midpoint` which can overflow
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#manual_midpoint
clippy lint msg: this lifetime isn't used in the function definition
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#extra_unused_lifetimes
@noahbald
Copy link
Owner

noahbald commented Dec 8, 2025

Thanks Gwen, are you happy for me to merge this?

@gwen-lg
Copy link
Contributor Author

gwen-lg commented Dec 8, 2025

Yes you can merge this to at least reduce the number of lints to fix

@noahbald noahbald merged commit a727519 into noahbald:main Dec 9, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants