Skip to content

Commit ec7c568

Browse files
pcwaltonemberian
authored andcommitted
---
yaml --- r: 66399 b: refs/heads/master c: 8cd40f9 h: refs/heads/master i: 66397: df5184c 66395: 82523b7 66391: bdbf6d6 66383: 2b0f479 66367: 376e427 v: v3
1 parent dffed2b commit ec7c568

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f463e69d203ffdd1a0c6c73612a0ba514a700a78
2+
refs/heads/master: 8cd40f9032fa15dc083646ba2105b3fae0a96eb5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/libstd/str.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ impl<'self> Iterator<(uint, uint)> for StrMatchesIndexIterator<'self> {
357357
fn next(&mut self) -> Option<(uint, uint)> {
358358
// See Issue #1932 for why this is a naive search
359359
let (h_len, n_len) = (self.haystack.len(), self.needle.len());
360-
let mut (match_start, match_i) = (0, 0);
360+
let mut match_start = 0;
361+
let mut match_i = 0;
361362

362363
while self.position < h_len {
363364
if self.haystack[self.position] == self.needle[match_i] {
@@ -685,7 +686,7 @@ pub fn count_chars(s: &str, start: uint, end: uint) -> uint {
685686
/// Counts the number of bytes taken by the first `n` chars in `s`
686687
/// starting from `start`.
687688
pub fn count_bytes<'b>(s: &'b str, start: uint, n: uint) -> uint {
688-
assert!(is_char_boundary(s, start));
689+
assert!(s.is_char_boundary(start));
689690
let mut end = start;
690691
let mut cnt = n;
691692
let l = s.len();

0 commit comments

Comments
 (0)