Skip to content

Commit 361aea9

Browse files
jesse99brson
authored andcommitted
Fixing warnings for long and blank lines
1 parent 333d268 commit 361aea9

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

src/libcore/char.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ pub pure fn escape_unicode(c: char) -> ~str {
135135
let mut out = ~"\\";
136136
unsafe {
137137
str::push_str(&mut out, str::from_char(c));
138-
for uint::range(str::len(s), pad) |_i| { str::push_str(&mut out, ~"0"); }
138+
for uint::range(str::len(s), pad) |_i|
139+
{ str::push_str(&mut out, ~"0"); }
139140
str::push_str(&mut out, s);
140141
}
141142
move out

src/libstd/base64.rs

+11-10
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ impl &[u8]: ToBase64 {
1515
unsafe {
1616
let len = self.len();
1717
str::reserve(&mut s, ((len + 3u) / 4u) * 3u);
18-
18+
1919
let mut i = 0u;
20-
20+
2121
while i < len - (len % 3u) {
2222
let n = (self[i] as uint) << 16u |
2323
(self[i + 1u] as uint) << 8u |
2424
(self[i + 2u] as uint);
25-
25+
2626
// This 24-bit number gets separated into four 6-bit numbers.
2727
str::push_char(&mut s, chars[(n >> 18u) & 63u]);
2828
str::push_char(&mut s, chars[(n >> 12u) & 63u]);
2929
str::push_char(&mut s, chars[(n >> 6u) & 63u]);
3030
str::push_char(&mut s, chars[n & 63u]);
31-
31+
3232
i += 3u;
3333
}
34-
34+
3535
// Heh, would be cool if we knew this was exhaustive
3636
// (the dream of bounded integer types)
3737
match len % 3 {
@@ -44,7 +44,8 @@ impl &[u8]: ToBase64 {
4444
str::push_char(&mut s, '=');
4545
}
4646
2 => {
47-
let n = (self[i] as uint) << 16u | (self[i + 1u] as uint) << 8u;
47+
let n = (self[i] as uint) << 16u |
48+
(self[i + 1u] as uint) << 8u;
4849
str::push_char(&mut s, chars[(n >> 18u) & 63u]);
4950
str::push_char(&mut s, chars[(n >> 12u) & 63u]);
5051
str::push_char(&mut s, chars[(n >> 6u) & 63u]);
@@ -85,11 +86,11 @@ impl ~[u8]: FromBase64 {
8586
let mut i = 0u;
8687
while i < len {
8788
let mut n = 0u;
88-
89+
8990
for iter::repeat(4u) {
9091
let ch = self[i] as char;
9192
n <<= 6u;
92-
93+
9394
if ch >= 'A' && ch <= 'Z' {
9495
n |= (ch as uint) - 0x41u;
9596
} else if ch >= 'a' && ch <= 'z' {
@@ -116,10 +117,10 @@ impl ~[u8]: FromBase64 {
116117
} else {
117118
fail ~"invalid base64 character";
118119
}
119-
120+
120121
i += 1u;
121122
};
122-
123+
123124
r.push(((n >> 16u) & 0xFFu) as u8);
124125
r.push(((n >> 8u ) & 0xFFu) as u8);
125126
r.push(((n ) & 0xFFu) as u8);

0 commit comments

Comments
 (0)