Giter Site home page Giter Site logo

Comments (8)

alexcrichton avatar alexcrichton commented on May 18, 2024

Yeah this was sort of the ... "easy" mode? Do we want it to support everything? Do you have an idea how to fix? (I don't)

from tokio-io.

carllerche avatar carllerche commented on May 18, 2024

It could be unconditionally called, but then it would require changing the return signature of decode_eof -> Result<Option<Item>> or something like that.

from tokio-io.

alexcrichton avatar alexcrichton commented on May 18, 2024

Perhaps yeah, but I'd be wary of how the meaning of None is then very different between decode and decode_eof.

from tokio-io.

carllerche avatar carllerche commented on May 18, 2024

from tokio-io.

alexcrichton avatar alexcrichton commented on May 18, 2024

It's true yeah being a default method could help quite a bit here. That means most will never implement the method itself.

Perhaps we could try itout and see how it goes? (I can't think of any other alternatives myself)

from tokio-io.

Ralith avatar Ralith commented on May 18, 2024

It could be unconditionally called, but then it would require changing the return signature of decode_eof -> Result<Option> or something like that.

This was the approach that I introduced in #1, motivated purely by it seeming much more obvious to me. It was reverted in cddbdb3.

from tokio-io.

carllerche avatar carllerche commented on May 18, 2024

from tokio-io.

Ralith avatar Ralith commented on May 18, 2024

To be clear, I was referring to the EOF handling, not generic errors (which are offtopic in this PR).

from tokio-io.

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.