diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2014-12-14 04:16:34 +0530 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-12-27 14:48:36 +0100 |
commit | e9d1740e19a82c5c91cc196c7c00ba57c56ec971 (patch) | |
tree | cf20c732c36bf1763267e5776c02032a83c21639 /components/script/textinput.rs | |
parent | 475ff4dcb7ecec6eed607c05eac452ab8bf52001 (diff) | |
download | servo-e9d1740e19a82c5c91cc196c7c00ba57c56ec971.tar.gz servo-e9d1740e19a82c5c91cc196c7c00ba57c56ec971.zip |
script: to_string() -> into_string()
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r-- | components/script/textinput.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs index 2b357b793a2..a80a9915557 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -99,7 +99,7 @@ impl TextInput { -1 }, true); } - self.replace_selection("".to_string()); + self.replace_selection("".into_string()); } /// Insert a character at the current editing point @@ -132,12 +132,12 @@ impl TextInput { let lines_suffix = self.lines.slice(end.line + 1, self.lines.len()); let mut insert_lines = if self.multiline { - insert.as_slice().split('\n').map(|s| s.to_string()).collect() + insert.as_slice().split('\n').map(|s| s.into_string()).collect() } else { vec!(insert) }; - let mut new_line = prefix.to_string(); + let mut new_line = prefix.into_string(); new_line.push_str(insert_lines[0].as_slice()); insert_lines[0] = new_line; @@ -319,7 +319,7 @@ impl TextInput { /// Get the current contents of the text input. Multiple lines are joined by \n. pub fn get_content(&self) -> DOMString { - let mut content = "".to_string(); + let mut content = "".into_string(); for (i, line) in self.lines.iter().enumerate() { content.push_str(line.as_slice()); if i < self.lines.len() - 1 { @@ -333,7 +333,7 @@ impl TextInput { /// any \n encountered will be stripped and force a new logical line. pub fn set_content(&mut self, content: DOMString) { self.lines = if self.multiline { - content.as_slice().split('\n').map(|s| s.to_string()).collect() + content.as_slice().split('\n').map(|s| s.into_string()).collect() } else { vec!(content) }; |