]> git.lizzy.rs Git - rust.git/commitdiff
Use a byte literal in libregex
authornham <hamann.nick@gmail.com>
Wed, 6 Aug 2014 05:18:19 +0000 (01:18 -0400)
committernham <hamann.nick@gmail.com>
Wed, 6 Aug 2014 05:18:19 +0000 (01:18 -0400)
src/libregex/test/bench.rs

index 2a606ccd0cee33c976585c75279e1c9bdaee627e..4bd9d1a8666c0949f28707294c4b28bf01c8a25e 100644 (file)
@@ -159,7 +159,7 @@ fn gen_text(n: uint) -> String {
                        .collect::<Vec<u8>>();
     for (i, b) in bytes.mut_iter().enumerate() {
         if i % 20 == 0 {
-            *b = '\n' as u8
+            *b = b'\n'
         }
     }
     String::from_utf8(bytes).unwrap()