]> git.lizzy.rs Git - rust.git/blobdiff - src/libregex/test/bench.rs
librand: Remove all uses of `~str` from `librand`
[rust.git] / src / libregex / test / bench.rs
index 3630e0ebb5c8e5b666cdbe2a167b094d823350ae..4c4ba8dd6bf93e133db10fa4b8208cd85cf5cbed 100644 (file)
@@ -159,7 +159,7 @@ fn gen_text(n: uint) -> StrBuf {
             *b = '\n' as u8
         }
     }
-    str::from_utf8(bytes).unwrap().to_strbuf()
+    str::from_utf8(bytes.as_slice()).unwrap().to_strbuf()
 }
 
 throughput!(easy0_32, easy0(), 32)