hyperium / hyperium/http

Allow using match with Scheme

Open
#789 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.4k
Forks
378
Avg merge
1d 21h
Merged PRs (30d)
5

Description

While working with the crate, I noticed that many types like Method, HeaderName and others have from_bytes, but Scheme only has from_str. Would it make sense to add from_bytes for consistency with the others? Personally my use case is parsing a scheme from [u8]. Luckily there are only two schemes so I can match myself and this isn't really tedious but wondering if it could make sense from a consistency perspective.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by comparing the existing from_bytes methods on Method and HeaderName with Scheme's from_str implementation. Check how Scheme parsing is tested, then define completion as consistent byte-slice parsing for Scheme with matching coverage for the supported schemes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.