Code Monkey home page Code Monkey logo

Comments (6)

jbr avatar jbr commented on June 26, 2024

@yoshuawuyts ☝️

from async-sse.

yoshuawuyts avatar yoshuawuyts commented on June 26, 2024

Hmm, I didn't expect people to wanr to send messages without an event name, but I guess that's proven to be overly limiting.

I think the first option would be the most straightforward; issuing a semver major seems fine for this as well.

Though I wonder: if we make the argument impl Into<Option<&str>>, that should work with both string literals and None right? If that works I don't believe that would be a breaking change since all previous inputs are accepted, but it's possible to pass None to omit the name. (Not near a computer right now so can't confirm if this works)

from async-sse.

joshtriplett avatar joshtriplett commented on June 26, 2024

Hmm, I didn't expect people to wanr to send messages without an event name, but I guess that's proven to be overly limiting.

For short messages, event: xyz adds substantial overhead.

Though I wonder: if we make the argument impl Into<Option<&str>>, that should work with both string literals and None right? If that works I don't believe that would be a breaking change since all previous inputs are accepted, but it's possible to pass None to omit the name. (Not near a computer right now so can't confirm if this works)

That's a good idea, and it'd be much easier for people to use. It would not technically be a breaking change by the normal compatibility rules, but it could potentially break code that was relying on inference. I think it'd still be a good idea to do a major version bump for it, but most people should just be able to recompile their code. I'll implement that.

from async-sse.

joshtriplett avatar joshtriplett commented on June 26, 2024

Fixed in #15

from async-sse.

jbr avatar jbr commented on June 26, 2024

released in v5.0.0 — I think it should be possible to use a patch.crates-io to use this with tide 0.15, but I haven't confirmed that. If not, tide bump will probably wait for next tide minor

from async-sse.

jbr avatar jbr commented on June 26, 2024

ref: http-rs/tide#760

from async-sse.

Related Issues (6)

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.