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

Replace anyhow with thiserror #115

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Commits on Dec 4, 2022

  1. Replace anyhow with thiserror

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    54b59c2 View commit details
    Browse the repository at this point in the history
  2. Make IndexOutOfBounds error kind more expressive

    By adding a "available" length field that can be shown in the error
    display.
    For this, the ZstdDagCborSeq::len() function was added.
    
    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    dedc980 View commit details
    Browse the repository at this point in the history
  3. Make Error::Invalid more expressive

    The error variant is not nice yet, but better than before.
    
    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    1b4e521 View commit details
    Browse the repository at this point in the history
  4. Simplify validation

    This patch simplifies the boolean expressions.
    
    Before this patch, the expressions were ported from the
    `anyhow::ensure!()` macro by replacing it with `if !(...)`, which was
    simple and a no-brainer to replace.
    
    With this patch, we simplify the expression to not contain unnecessary
    `!` in there.
    
    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    425eae6 View commit details
    Browse the repository at this point in the history
  5. Replace Busy variant with MultipleStrongRef

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    54f589c View commit details
    Browse the repository at this point in the history
  6. Replace Full with MaxSizeExceeded error variant

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    b1f92e0 View commit details
    Browse the repository at this point in the history
  7. Rename: FoundPurgedData -> PurgedDataFound

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    adf47d6 View commit details
    Browse the repository at this point in the history
  8. Make error text more expressive

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    d2145e6 View commit details
    Browse the repository at this point in the history
  9. Fix clippy: Do not pass ref here

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    30ed94f View commit details
    Browse the repository at this point in the history
  10. Simplify comparison

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    b48c6f5 View commit details
    Browse the repository at this point in the history
  11. Fix: Make comparison fit error message

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    293e515 View commit details
    Browse the repository at this point in the history
  12. Remove unnecessary cast

    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    matthiasbeyer committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    de35a90 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2022

  1. WIP: Rewrite banyan-utils to replace anyhow with thiserror

    This patch rewrites banyan-utils to use thiserror and the new
    (thiserror-based) banyan API instead of anyhow.
    matthiasbeyer committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    dde0b3a View commit details
    Browse the repository at this point in the history