uv/crates/uv-distribution-filename
Ankit Saini ef95d79bfa
Fix version string truncation while generating cache_key (#11830)
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

Follow up for https://github.com/astral-sh/uv/pull/11738

I missed this while reviewing the truncation changes. 

`format!("{:.N}", value)` only truncates if the `fmt::Display`
implementation supports it (by reading `f.precision()` in trait
implementation).

So in our case `format!("{:.N}", version.to_string())` will work but not
`format!("{:.N}", version)` unless `Version` supports it.

Since we only need it once, I am just truncating after the string is
created.

## Test Plan

<!-- How was it tested? -->
2025-02-27 08:48:43 -05:00
..
src Fix version string truncation while generating cache_key (#11830) 2025-02-27 08:48:43 -05:00
Cargo.toml Use hash instead of full wheel name in wheels bucket (#11738) 2025-02-26 22:41:57 +00:00