diff options
| author | kennytm <kennytm@gmail.com> | 2018-12-07 12:42:32 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-07 12:42:32 +0800 |
| commit | 0e41ef13aac432d7c33f9e1287270769deb69c3f (patch) | |
| tree | 4bf4ba43ba7add944b6e078511960fbf1876dc9c /src/libsyntax/util | |
| parent | 6a07f23c78dde6368e4566218aef4c38d9d64ec6 (diff) | |
| parent | c025d6140999e07ddf0294f0676c64ff2322a210 (diff) | |
| download | rust-0e41ef13aac432d7c33f9e1287270769deb69c3f.tar.gz rust-0e41ef13aac432d7c33f9e1287270769deb69c3f.zip | |
Rollup merge of #56516 - frewsxcv:frewsxcv-eq, r=Mark-Simulacrum
Replace usages of `..i + 1` ranges with `..=i`. Before this change we were using old computer code techniques. After this change we use the new and improved computer code techniques.
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/lev_distance.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/util/lev_distance.rs b/src/libsyntax/util/lev_distance.rs index fb281154be0..e6b81a59d86 100644 --- a/src/libsyntax/util/lev_distance.rs +++ b/src/libsyntax/util/lev_distance.rs @@ -20,7 +20,7 @@ pub fn lev_distance(a: &str, b: &str) -> usize { return a.chars().count(); } - let mut dcol: Vec<_> = (0..b.len() + 1).collect(); + let mut dcol: Vec<_> = (0..=b.len()).collect(); let mut t_last = 0; for (i, sc) in a.chars().enumerate() { |
