mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
This commit is contained in:
parent
26045d7fcb
commit
d1b433a3b3
160 changed files with 1427 additions and 1162 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue