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

Add support for hashing from a reader #159

Open
wants to merge 8 commits into
base: feat/no-digest
Choose a base branch
from

Commits on Nov 8, 2021

  1. remove per-hash digest type

    Remove the per-hasher digest type. Instead, store hash digests inside
    the hashers and "borrow" it. In all cases, we're going to copy it into a
    `Multihash<S>` anyways.
    
    This:
    
    1. Removes bunch of code.
    2. Means that hashers don't need to be generic over the size (unless
    they actually support multiple sizes). This fixes the UX issue
    introduced in the const generics PR.
    3. Avoids some copying.
    
    BREAKING CHANGE
    
    1. `Hasher.digest` no longer exists. Users should use
    `Code::SomeCode.digest` where possible.
    2. The hasher digests no longer exist.
    Stebalien committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    0c0eb11 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2021

  1. return a result from Code::wrap

    The multihash digest may not fit.
    Stebalien committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    184ed59 View commit details
    Browse the repository at this point in the history
  2. Add support for hashing from a reader

    fixes #141
    Stebalien committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    f002173 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2022

  1. fix: don't introduce io_path

    Use config flags instead of introducing the new attribute `io_path`.
    vmx committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    fe59061 View commit details
    Browse the repository at this point in the history
  2. fix: use compile-time asserts to guards unwraps

    With some compile-time asserts we can make sure that certain `unwrap()`
    calls won't panic.
    vmx committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    ec8cc76 View commit details
    Browse the repository at this point in the history
  3. chore: remove debugging left-over

    vmx committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    e1a6943 View commit details
    Browse the repository at this point in the history
  4. chore: rust fmt

    vmx committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    095f19c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    868dab7 View commit details
    Browse the repository at this point in the history