Bugfix/loss of precision when parsing value with unit (#15606)

Closes #12858

# Description
As explained in the ticket, easy to reproduce. Example: 1.07 minute is
1.07*60=64.2 secondes
```nushell
# before - wrong
> 1.07min
1min 4sec

# now - right
> 1.07min
1min 4sec 200ms
```

# User-Facing Changes
Bug is fixed when using ``into duration``.

# Tests + Formatting
Added a test for ``into duration``
Fixed ``parse_long_duration`` test: we gained precision 😄 

# After Submitting
Release notes? Or blog is enough? Let me know
This commit is contained in:
Loïc Riegel
2025-04-20 00:02:40 +02:00
committed by GitHub
parent 24dba9dc53
commit 1503ee09ba
5 changed files with 52 additions and 12 deletions

View File

@ -54,6 +54,7 @@ mod insert;
mod inspect;
mod interleave;
mod into_datetime;
mod into_duration;
mod into_filesize;
mod into_int;
mod join;