diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-26 19:10:24 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-29 07:49:02 -0500 |
| commit | 16a2503a1c4c99a50ceea148d56dc8a6309be048 (patch) | |
| tree | 437b6b9569d3c8d132f0dc9bdb85b6b8d8b57346 | |
| parent | 3cc191e58acfcffdce6fd718c8fcc1e1d3c36d23 (diff) | |
| download | rust-16a2503a1c4c99a50ceea148d56dc8a6309be048.tar.gz rust-16a2503a1c4c99a50ceea148d56dc8a6309be048.zip | |
undo some conversions
| -rw-r--r-- | src/libcore/iter.rs | 2 | ||||
| -rw-r--r-- | src/librustc/util/lev_distance.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 5ef5ac95e24..2e966ce59bc 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -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]); /// } diff --git a/src/librustc/util/lev_distance.rs b/src/librustc/util/lev_distance.rs index fbd5cc5c74d..ca1bb7d7a94 100644 --- a/src/librustc/util/lev_distance.rs +++ b/src/librustc/util/lev_distance.rs @@ -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); |
