diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-21 11:53:49 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-21 11:53:49 -0800 |
| commit | 886c6f3534e6f03916eeff2ea8b235e85dd04b42 (patch) | |
| tree | 616ec48db83b768a4be84225bed9b0c0f730072d /src/libstd/num | |
| parent | 036d8c41897099b5822eafa40e3f1fd2cdc4a92a (diff) | |
| parent | 537889aa78c984ee6484d16fec4a67f35778aec6 (diff) | |
| download | rust-886c6f3534e6f03916eeff2ea8b235e85dd04b42.tar.gz rust-886c6f3534e6f03916eeff2ea8b235e85dd04b42.zip | |
rollup merge of #21258: aturon/stab-3-index
Conflicts: src/libcore/ops.rs src/librustc_typeck/astconv.rs src/libstd/io/mem.rs src/libsyntax/parse/lexer/mod.rs
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/strconv.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 67fe599ecd6..1d3bf484edb 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -379,14 +379,14 @@ pub fn float_to_str_bytes_common<T: Float>( // only resize buf if we actually remove digits if i < buf_max_i { - buf = buf.slice(0, i + 1).to_vec(); + buf = buf[.. (i + 1)].to_vec(); } } } // If exact and trailing '.', just cut that else { let max_i = buf.len() - 1; if buf[max_i] == b'.' { - buf = buf.slice(0, max_i).to_vec(); + buf = buf[.. max_i].to_vec(); } } |
