aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/layout/construct.rs6
-rw-r--r--components/layout/css/matching.rs2
-rw-r--r--components/layout/layout_debug.rs2
-rw-r--r--components/layout/layout_task.rs2
-rw-r--r--components/layout/wrapper.rs6
5 files changed, 9 insertions, 9 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index a5fef43df0b..c8efb792886 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -451,7 +451,7 @@ impl<'a> FlowConstructor<'a> {
// Add whitespace results. They will be stripped out later on when
// between block elements, and retained when between inline elements.
let fragment_info =
- SpecificFragmentInfo::UnscannedText(UnscannedTextFragmentInfo::from_text(" ".to_string()));
+ SpecificFragmentInfo::UnscannedText(UnscannedTextFragmentInfo::from_text(" ".into_string()));
let fragment = Fragment::from_opaque_node_and_style(whitespace_node,
whitespace_style,
whitespace_damage,
@@ -648,7 +648,7 @@ impl<'a> FlowConstructor<'a> {
whitespace_damage)) => {
// Instantiate the whitespace fragment.
let fragment_info = SpecificFragmentInfo::UnscannedText(UnscannedTextFragmentInfo::from_text(
- " ".to_string()));
+ " ".into_string()));
let fragment = Fragment::from_opaque_node_and_style(whitespace_node,
whitespace_style,
whitespace_damage,
@@ -959,7 +959,7 @@ impl<'a> FlowConstructor<'a> {
.list_style_type) {
None => None,
Some(text) => {
- let text = text.to_string();
+ let text = text.into_string();
let mut unscanned_marker_fragments = DList::new();
unscanned_marker_fragments.push_back(Fragment::new_from_specific_info(
node,
diff --git a/components/layout/css/matching.rs b/components/layout/css/matching.rs
index 4251769de60..656d08bcbc2 100644
--- a/components/layout/css/matching.rs
+++ b/components/layout/css/matching.rs
@@ -241,7 +241,7 @@ impl StyleSharingCandidate {
parent_style: parent_style,
local_name: element.get_local_name().clone(),
class: element.get_attr(&ns!(""), &atom!("class"))
- .map(|string| string.to_string()),
+ .map(|string| string.into_string()),
link: element.get_link().is_some(),
namespace: (*element.get_namespace()).clone(),
common_style_affecting_attributes:
diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs
index 6e00a102bcc..a70dca58840 100644
--- a/components/layout/layout_debug.rs
+++ b/components/layout/layout_debug.rs
@@ -104,7 +104,7 @@ pub fn begin_trace(flow_root: FlowRef) {
let flow_trace = json::encode(&flow::base(flow_root.deref()));
let state = State {
- scope_stack: vec![box ScopeData::new("root".to_string(), flow_trace)],
+ scope_stack: vec![box ScopeData::new("root".into_string(), flow_trace)],
flow_root: flow_root,
};
state_key.replace(Some(RefCell::new(state)));
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index 8c0890dac80..2eeeb31409f 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -493,7 +493,7 @@ impl LayoutTask {
// GWTODO: Need to handle unloading web fonts (when we handle unloading stylesheets!)
let mut rw_data = self.lock_rw_data(possibly_locked_rw_data);
iter_font_face_rules(&sheet, &rw_data.stylist.device, |family, src| {
- self.font_cache_task.add_web_font(family.to_string(), (*src).clone());
+ self.font_cache_task.add_web_font(family.into_string(), (*src).clone());
});
rw_data.stylist.add_stylesheet(sheet);
LayoutTask::return_rw_data(possibly_locked_rw_data, rw_data);
diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs
index c197c60242a..448b4c9e6c9 100644
--- a/components/layout/wrapper.rs
+++ b/components/layout/wrapper.rs
@@ -187,7 +187,7 @@ impl<'ln> TLayoutNode for LayoutNode<'ln> {
fn text(&self) -> String {
unsafe {
if let Some(text) = TextCast::to_js(self.get_jsmanaged()) {
- (*text.unsafe_get()).characterdata().data_for_layout().to_string()
+ (*text.unsafe_get()).characterdata().data_for_layout().into_string()
} else if let Some(input) = HTMLInputElementCast::to_js(self.get_jsmanaged()) {
input.get_value_for_layout()
} else if let Some(area) = HTMLTextAreaElementCast::to_js(self.get_jsmanaged()) {
@@ -634,10 +634,10 @@ fn get_content(content_list: &content::T) -> String {
let iter = &mut value.clone().into_iter().peekable();
match iter.next() {
Some(content::StringContent(content)) => content,
- _ => "".to_string(),
+ _ => "".into_string(),
}
}
- _ => "".to_string(),
+ _ => "".into_string(),
}
}