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

refactor: Drop error results from functions that never fail #777

Merged
merged 7 commits into from
May 30, 2023

Commits on May 24, 2023

  1. refactor: don't return an error from ImmutableTree.Hash

    There are no cases where Hash would fail, so don't return an error
    value. Simplifies every caller, as can be seen from the test changes.
    
    Fixes cosmos#757
    elias-orijtech committed May 24, 2023
    Configuration menu
    Copy the full SHA
    eda2be0 View commit details
    Browse the repository at this point in the history
  2. perf: remove useless temporary buffer

    The byte buffer in Node.hashWithCount is not necessary because the
    hash.Hash interface implements io.Writer. Use that directly instead to
    save allocations and memory.
    elias-orijtech committed May 24, 2023
    Configuration menu
    Copy the full SHA
    4a49004 View commit details
    Browse the repository at this point in the history
  3. refactor: don't return an error from Node._hash

    There's no need because the hashing can never fail.
    elias-orijtech committed May 24, 2023
    Configuration menu
    Copy the full SHA
    89e2880 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2023

  1. refactor: don't return an error from NewImmutableTree[WithOpts]

    Tree construction never fails, so don't return an error.
    
    Fixes cosmos#756
    elias-orijtech committed May 25, 2023
    Configuration menu
    Copy the full SHA
    3b062fe View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. Configuration menu
    Copy the full SHA
    32712a6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eb4b222 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2023

  1. Configuration menu
    Copy the full SHA
    579a1ab View commit details
    Browse the repository at this point in the history