Skip to content

fix: suggest prefixed units for unknown identifiers - #903

Open
efegokdemir wants to merge 1 commit into
sharkdp:mainfrom
efegokdemir:fix-103-prefixed-unit-suggestions
Open

efegokdemir wants to merge 1 commit into
sharkdp:mainfrom
efegokdemir:fix-103-prefixed-unit-suggestions

Conversation

@efegokdemir

Copy link
Copy Markdown

Closes #103

Summary

  • Include valid prefixed units in unknown-identifier suggestions.
  • Respect metric/binary prefix support and short/long alias settings.
  • Prefer MiB over unrelated suggestions when the user enters Mib.
  • Preserve existing suggestions for ordinary unit names.

Tests

  • Add regression coverage for Mib, kiolmeter and niles.
  • cargo test -p numbat --quiet
  • cargo fmt --all -- --check
  • git diff --check
  • cargo clippy -p numbat --all-targets -- -D warnings -A clippy::map_or_identity

Clippy excludes only the existing map_or_identity warning in numbat/src/list.rs:94, which is present on upstream main and is unrelated to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include prefixed units in suggestions

1 participant