Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a

This commit is contained in:
Jack Moffitt 2014-11-05 12:33:11 -07:00 committed by Glenn Watson
parent 26045d7fcb
commit d1b433a3b3
160 changed files with 1427 additions and 1162 deletions

View file

@ -24,8 +24,7 @@ use http::method::Post;
use servo_msg::constellation_msg::LoadData;
use servo_util::str::DOMString;
use script_task::{ScriptChan, TriggerLoadMsg};
use std::ascii::OwnedStrAsciiExt;
use std::str::StrSlice;
use std::ascii::OwnedAsciiExt;
use url::UrlParser;
use url::form_urlencoded::serialize;
use string_cache::Atom;
@ -200,26 +199,26 @@ impl<'a> HTMLFormElementHelpers for JSRef<'a, HTMLFormElement> {
for ch in s.chars() {
match ch {
'\n' if prev != '\r' => {
buf.push_char('\r');
buf.push_char('\n');
buf.push('\r');
buf.push('\n');
},
'\n' => {
buf.push_char('\n');
buf.push('\n');
},
// This character isn't LF but is
// preceded by CR
_ if prev == '\r' => {
buf.push_char('\r');
buf.push_char('\n');
buf.push_char(ch);
buf.push('\r');
buf.push('\n');
buf.push(ch);
},
_ => buf.push_char(ch)
_ => buf.push(ch)
};
prev = ch;
}
// In case the last character was CR
if prev == '\r' {
buf.push_char('\n');
buf.push('\n');
}
buf
}