Skip to content

Commit 191796f

Browse files
committed
Some standard rust functions are renamed.
1 parent eacaaab commit 191796f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/bits.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ impl Bits {
5050
self.data.push((number << (16-b)) as u8);
5151
}
5252
(_, 0..8) => {
53-
*self.data.mut_last().unwrap() |= (number << (8-b)) as u8;
53+
*self.data.last_mut().unwrap() |= (number << (8-b)) as u8;
5454
}
5555
(_, 9..16) => {
56-
*self.data.mut_last().unwrap() |= (number >> (b-8)) as u8;
56+
*self.data.last_mut().unwrap() |= (number >> (b-8)) as u8;
5757
self.data.push((number << (16-b)) as u8);
5858
}
5959
_ => {
60-
*self.data.mut_last().unwrap() |= (number >> (b-8)) as u8;
60+
*self.data.last_mut().unwrap() |= (number >> (b-8)) as u8;
6161
self.data.push((number >> (b-16)) as u8);
6262
self.data.push((number << (24-b)) as u8);
6363
}

src/canvas.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ impl Canvas {
14831483
|j| self.get(i, j)
14841484
};
14851485

1486-
let mut colors = range(0, self.width).map(map_fn).chain(Some(Empty).move_iter());
1486+
let mut colors = range(0, self.width).map(map_fn).chain(Some(Empty).into_iter());
14871487

14881488
let mut last_color = Empty;
14891489
let mut consecutive_len = 1u16;

src/ec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ pub fn create_error_correction_code(data: &[u8], ec_code_size: uint) -> Vec<u8>
2828
}
2929

3030
let log_lead_coeff = LOG_TABLE[lead_coeff] as uint;
31-
for (u, v) in res.mut_slice_from(i+1).mut_iter().zip(log_den.iter()) {
31+
for (u, v) in res.slice_from_mut(i+1).iter_mut().zip(log_den.iter()) {
3232
*u ^= EXP_TABLE[((*v as uint + log_lead_coeff) % 255) as uint];
3333
}
3434
}
3535

36-
res.move_iter().skip(data_len).collect()
36+
res.into_iter().skip(data_len).collect()
3737
}
3838

3939
#[cfg(test)]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl QrCode {
153153
let width = self.width;
154154
let mut k = 0;
155155
let mut res = String::with_capacity(width * (width + 1));
156-
for i in range(0, width) {
156+
for _ in range(0, width) {
157157
res.push_char('\n');
158158
for _ in range(0, width) {
159159
res.push_char(if self.content[k] { on_char } else { off_char });

0 commit comments

Comments
 (0)