Giter Club home page Giter Club logo

Comments (3)

DrPeterVanNostrand avatar DrPeterVanNostrand commented on May 26, 2024 1

Yup, sorry, that is definitely true. You just lose the "error-chaining" and implicit impl From<rse::Error> for Error benefits of using error-chain. For now, we can just use a tuple enum in the ReedSolomon variant. If you are interested, the Issue and corresponding PR in reed-solomon-erasure can be found here (the author was very quick to respond):
Issue
PR

from hbbft.

DrPeterVanNostrand avatar DrPeterVanNostrand commented on May 26, 2024

For the moment, error-chain can't be used by hbbft because we depend onreed_solomon_erasure::Error which doesn't implement the std::error::Error trait, all error types that get chained together by error-chain must implement std::error::Error.

I'm going to file an Issue with reed_solomon_erasure requesting the feature. So at least for now, hbbft is stuck with error enums. If the issue isn't picked up, I might be able to submit a PR implementing std Error.

from hbbft.

afck avatar afck commented on May 26, 2024

But an error variant can contain any kind of parameter, can't it? So due to that limitation the ReedSolomon(reed_solomon_erasure::Error) variant wouldn't be in foreign_links, but it could still live in the errors section for now?

(That said, I agree that not implementing the Error trait is an omission that should be fixed in the reed_solomon_erasure crate!)

from hbbft.

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.