Giter Club home page Giter Club logo

Comments (7)

svenstaro avatar svenstaro commented on April 27, 2024

Yeah, that'd be a good effort.

from miniserve.

 avatar commented on April 27, 2024

Just one quick question, do you mind having an enum with all miniserve's error kind, or do you want them to be split like right now, aka CompressionErrorKind, UploadErrorKind, etc ? In the latter case, I think I need to implement Fail, Display, etc, for all those enums, so some copy/paste. Having a single enum allows to implement it once for good, but that's 1 quite big enum. Your call :)

PS: there might be a third solution, that would allow to have separate enums, but only 1 implementation, but sadly I can't figure out how...

from miniserve.

svenstaro avatar svenstaro commented on April 27, 2024

Ok so honestly I'm thinking hard about both ways and I think I'm entirely balanced concerning my opinion on the matter. For one, it seems nice to have separate errors for separate parts of the application but then again we might also run into scenarios where an error fits into neither category and that'd be awkward.

Cutting down on boilerplate is always nice, of course.

I'll let you make the call on this.

from miniserve.

 avatar commented on April 27, 2024

The argument about an error fitting into no/several categories is very true, didn't think about that. This will probably be the case with IoError, which can happen during compressing, and during uploading.

from miniserve.

svenstaro avatar svenstaro commented on April 27, 2024

from miniserve.

svenstaro avatar svenstaro commented on April 27, 2024

Glad to hear you like it!

from miniserve.

svenstaro avatar svenstaro commented on April 27, 2024

Leaving this open until the very last unwrap() is gone :P

from miniserve.

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.