]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/windows/os.rs
Fallout from stabilization.
[rust.git] / src / libstd / sys / windows / os.rs
index e9490dc95c940822bfc0fa163a7e40d4ab3c067b..36dc9b2afe49feb673cfd58081e7634ca22a08c2 100644 (file)
@@ -146,7 +146,7 @@ pub fn fill_utf16_buf_and_decode<F>(mut f: F) -> Option<String> where
                 done = true;
             }
             if k != 0 && done {
-                let sub = buf.slice(0, k as uint);
+                let sub = &buf[.. (k as uint)];
                 // We want to explicitly catch the case when the
                 // closure returned invalid UTF-16, rather than
                 // set `res` to None and continue.