]> git.lizzy.rs Git - rust.git/commitdiff
undo some conversions
authorJorge Aparicio <japaricious@gmail.com>
Tue, 27 Jan 2015 00:10:24 +0000 (19:10 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Thu, 29 Jan 2015 12:49:02 +0000 (07:49 -0500)
src/libcore/iter.rs
src/librustc/util/lev_distance.rs

index 5ef5ac95e243daddfbc7c6319a5fd35b533a76e5..2e966ce59bce78be26dfd96de77269f1c2421be3 100644 (file)
@@ -2539,7 +2539,7 @@ pub struct Range<A> {
 /// ```
 /// let array = [0, 1, 2, 3, 4];
 ///
-/// for i in 0..5 {
+/// for i in range(0, 5) {
 ///     println!("{}", i);
 ///     assert_eq!(i,  array[i]);
 /// }
index fbd5cc5c74d648893a21bc4bdb76ecef37592ef4..ca1bb7d7a9404f0c2fea79bda4dac885476450a9 100644 (file)
@@ -45,7 +45,7 @@ pub fn lev_distance(me: &str, t: &str) -> uint {
 fn test_lev_distance() {
     use std::char::{ from_u32, MAX };
     // Test bytelength agnosticity
-    for c in 0u32..MAX as u32
+    for c in (0u32..MAX as u32)
              .filter_map(|i| from_u32(i))
              .map(|i| i.to_string()) {
         assert_eq!(lev_distance(&c[], &c[]), 0);