hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Remove Body's `Once` variant

Open seanmonstar opened this issue 3 years ago • 3 comments

seanmonstar avatar Jul 26 '22 01:07 seanmonstar

It was noted that the FFI body type makes use of Body::empty(). I think there's 2 ways we can fix that:

  1. Add a pub(crate) fn ffi() -> Body that just starts the type like this: https://github.com/hyperium/hyper/blob/509672aada0af68a91d963e69828c6e31c44cb7b/src/body/body.rs#L240
  2. Or, keep an Empty variant. I don't think I like this option as much, but welcome feedback.

seanmonstar avatar Jul 26 '22 02:07 seanmonstar

cc @Xuanwo

seanmonstar avatar Jul 26 '22 02:07 seanmonstar

  1. Add a pub(crate) fn ffi() -> Body that just starts the type like this

Let me give this a try!

Xuanwo avatar Jul 26 '22 02:07 Xuanwo