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

Fix-should-panic-lint #127

Merged
merged 6 commits into from
Feb 24, 2024
Merged

Fix-should-panic-lint #127

merged 6 commits into from
Feb 24, 2024

Commits on Feb 24, 2024

  1. tts: remove expect from spawning speech dispatcher

    in stead, the message has been wrapped in `.context()`, which wraps the originating error in an anyhow error with the specified message, so that, in stead of panicking, the error gets bubbled up, logged and tracked, and then the program exits with the span traces belonging to that error.
    this is much cleanner and healthier than panicking, so that's the reason I'm going with this
    albertotirla committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    b2b6102 View commit details
    Browse the repository at this point in the history
  2. input: don't use expect when opening listener socket

    in stead, wrap the message with `anyhow::context`, then bubble it upward
    albertotirla committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    6a56933 View commit details
    Browse the repository at this point in the history
  3. events and tests: remove unwraps and expects

    in stead, anyhow::context is being used, to wrap the error
    the signature of a function was changed to return a result, the test did likewise have to change to accomodate it. Luckily, that function was used only in one test
    albertotirla committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    47485fa View commit details
    Browse the repository at this point in the history
  4. object event test: annotated unwrap with allow

    this is done because I can't meaningfully use error propagation in that context, since the unwrapping happens inside the declaration of a lazy static, but the explicit allow had to be added in order to eliminate all clippy warnings
    albertotirla committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    55aa1d1 View commit details
    Browse the repository at this point in the history
  5. fix formatting

    albertotirla committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    43d6d41 View commit details
    Browse the repository at this point in the history
  6. fix some more clippy lints

    mostly related to using try_into instead of into, add explicit matching on unit types in stead of _, etc
    
    this should hopefully fix most of the warnings which make our clippy test fail
    albertotirla committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    7d98fd2 View commit details
    Browse the repository at this point in the history