Empty's Body impl `Error = Infallible` makes `Empty::new()` unable to be used w/ Body constraints

Open
#120 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust

Research direction

Start by locating Empty and the Body trait, then trace how Empty::new() fixes its associated Error type. Check existing Body constraint tests or examples for the expected generic usage. Done means Empty::new() can satisfy a caller's Body<Error=...> constraint without breaking existing behavior.

Written by the indexing model from the issue text.

Description

Empty has generic parameter for Data, so it would be nice to have a generic parameter for Error as well so that Empty::new() can be used w/ functions that set constraints on Body i.e B: Body<Error=..>

Dominant language
Rust
Stars
173
Forks
71
Avg merge
1d 12h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hyperium/http-body

All issues in hyperium/http-body

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.