Giter VIP home page Giter VIP logo

Comments (2)

rooooooooob avatar rooooooooob commented on July 17, 2024

This shouldn't be an issue here. The Hash trait is working on the direct bytes, just as the Ord/etc is, so the invariant specified in that link (k1 == k2 ⇒ hash(k1) == hash(k2)) to avoid issues (I imagine hashmap keys) still holds. I'm not sure exactly why it was originally written (this is pulled from old Jormungandr code right?) they didn't use the default Hash derivation, but it was probably to do with how without const generics (still unstable I think?, and definitely wasn't a thing back then) you couldn't auto-derive traits using const generics (e.g. N for number constants in [T; N]) so they had to manually specify a bunch of traits on [T, 1], [T, 2]... [T, 32] and anything above lacks most or all traits. Maybe Ord and such were so core to the language they had a special exception and Hash didn't.

@SebastienGllmt should we keep this open or just close it? Or if it's a problem for clippy we could put an ignore in the code, although after the refactor I guess.

from cardano-multiplatform-lib.

rooooooooob avatar rooooooooob commented on July 17, 2024

Fixed by #250

from cardano-multiplatform-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.