Incorrect largest decimal number

Open
#618 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust

Research direction

Start at src/header/value.rs near line 421 and compare the comment with the numeric limit used there. Confirm the intended digit count from the surrounding code, then make the comment and limit consistent and run the relevant Rust checks.

Written by the indexing model from the issue text.

Description

https://github.com/hyperium/http/blob/78e3d37563b0fe83886abffdcd8569117d45fee9/src/header/value.rs#L421|

The comment here states:

// The largest decimal number in 15 digits:
// It wold be 10.pow(15) - 1, but this is a constant
// version.
if num as u64 > 999_999_999_999_999_999 {

However, 999_999_999_999_999_999 is actually 18 digits.

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

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.

More from hyperium/http

All issues in hyperium/http

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.