Skip to content

fix(upower): resolve clippy warnings and remove dead code#658

Open
wayneColt wants to merge 1 commit intomecha-org:pre-releasefrom
wayneColt:waynecolt/fix-clippy-upower
Open

fix(upower): resolve clippy warnings and remove dead code#658
wayneColt wants to merge 1 commit intomecha-org:pre-releasefrom
wayneColt:waynecolt/fix-clippy-upower

Conversation

@wayneColt
Copy link
Copy Markdown

Clean up the upower crate to pass cargo clippy with zero warnings.

  • Replace fallible conversions (try_from) with infallible From impls where the conversion cannot fail
  • Use idiomatic e.to_string() instead of format!("{}", e)
  • Remove unused import and unnecessary .into() calls
  • Remove commented-out code blocks and dead test module
  • Fix copy-paste error in stream_battery_level log message

Verified: cargo clippy -p upower passes clean.

Replace fallible conversions with infallible From impls where the
conversion cannot fail. Remove unused import and unnecessary .into()
calls. Clean up commented-out code blocks.

cargo clippy -p upower now passes with zero warnings.
@wayneColt
Copy link
Copy Markdown
Author

Happy to adjust if needed — just ran clippy on a few crates while reading through the shell architecture.

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.

1 participant