Express auto resize functionality as a type?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- rust
- Domain
- developer-experience
Research direction
Start with issue #10 and trace the existing auto-resize and plain-histogram method contracts and error enums. Compare which errors apply to each mode, then define done as representing those differences in the type system rather than relying on comments, with precise error mappings for both styles.
Written by the indexing model from the issue text.
Description
While working on #10 I'm ending up with error options that can only occur if resize is disabled. This is unfortunate as it means that someone using resize will now have to handle error variants that won't ever occur at runtime.
The way that auto resize interacts with the contracts of the methods is a little regrettable to begin with. I wonder if there's a way we could reflect this difference in the type system rather than with comments here and there describing what will or won't happen when auto resize is enabled. Maybe a trait with associated types for errors and implementations for both auto resize and plain histograms? Almost all the code could be re-used between the two, I think, with just some different error enums to give each style a very precise error mapping.
- Dominant language
- Rust
- Stars
- 373
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HdrHistogram/HdrHistogram_rust
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
HdrHistogram/HdrHistogram_rust#128 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 32/100
HdrHistogram/HdrHistogram_rust#127 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
HdrHistogram/HdrHistogram_rust#120 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
HdrHistogram/HdrHistogram_rust#119 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
HdrHistogram/HdrHistogram_rust#114 · 3 comments · 1 reaction ·
All issues in HdrHistogram/HdrHistogram_rust
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
vercel-labs/agent-browser#2017 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tursodatabase/turso#9405 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolyMeilex/Neothesia#447 ·
Maintainers usually reply within 1 day
-
backend::vllm diffusion multimodal
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
trezor/trezor-firmware#7985 ·
Maintainers usually reply within 2 days