Skip to content

Commit

Permalink
Add trim option to fixed to match Base printing more
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Aug 7, 2019
1 parent 29818cb commit a46aba3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/ryu/fixed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
if precision > 0
buf[pos] = UInt8('.')
pos += 1
if trimtrailingzeros
precision = 1
end
for _ = 1:precision
buf[pos] = UInt8('0')
pos += 1
Expand Down

0 comments on commit a46aba3

Please sign in to comment.