Skip to content

Commit 4730d45

Browse files
committed
base64: fix build (assuming rust-lang/rust#19594 is merged)
1 parent 75b992f commit 4730d45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/base64/base64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ fn decode(input: &mut Reader, ignore_garbage: bool) {
142142
fn encode(input: &mut Reader, line_wrap: uint) {
143143
let b64_conf = base64::Config {
144144
char_set: base64::Standard,
145+
newline: base64::LF,
145146
pad: true,
146147
line_length: match line_wrap {
147148
0 => None,
@@ -159,9 +160,8 @@ fn encode(input: &mut Reader, line_wrap: uint) {
159160
// However, since GNU base64 outputs only LF (presumably because that is
160161
// the standard UNIX line ending), we strip CRs from the output to maintain
161162
// compatibility.
162-
let output = encoded.replace("\r", "");
163163

164-
println(output.as_slice());
164+
println(encoded.as_slice());
165165
}
166166

167167
fn help(progname: &str, usage: &str) {

0 commit comments

Comments
 (0)