]> git.lizzy.rs Git - rust.git/commit
fmt: use the minimum parts array size
authorNathan Froyd <froydnj@gmail.com>
Thu, 13 Apr 2017 20:24:30 +0000 (16:24 -0400)
committerNathan Froyd <froydnj@gmail.com>
Fri, 28 Apr 2017 19:33:17 +0000 (15:33 -0400)
commit2499d819d41b87d9b562377479e4a81f74bd49f1
tree81ab890de6b111b162f280c8cff2157fb96a3cfe
parenta21f61685d4aa2bd93152eaf53c469b29a3a9bee
fmt: use the minimum parts array size

The comments for flt2dec::to_shortest_str says that we only need a slice
of length 5 for the parts array.  Initializing a 16-part array is just
wasted effort and wasted stack space.  Other functions in the flt2dec
module have similar comments, so we adjust the parts arrays passed to
those functions accordingly.
src/libcore/fmt/float.rs