From 560e380767e78986fcf79c2be3c2a7231de3df6d Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Thu, 17 Jul 2014 08:31:31 +1000 Subject: [PATCH] Fix comments and variable names for atom wrapper. --- src/components/script/dom/node.rs | 2 +- src/components/util/atom.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs index ba3d7bbff1b..85f88565fe7 100644 --- a/src/components/script/dom/node.rs +++ b/src/components/script/dom/node.rs @@ -1273,7 +1273,7 @@ impl Node { ElementNodeTypeId(..) => { let element: &JSRef = ElementCast::to_ref(node).unwrap(); let element = element.deref(); - let element = build_element_from_tag(element.local_name.as_slice().into_string(), + let element = build_element_from_tag(element.local_name.as_slice().to_string(), element.namespace.clone(), &*document); NodeCast::from_temporary(element) }, diff --git a/src/components/util/atom.rs b/src/components/util/atom.rs index 769b75e48ca..415f9a46460 100644 --- a/src/components/util/atom.rs +++ b/src/components/util/atom.rs @@ -2,9 +2,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -// Provides a wrapper around the Atom type in the string cache -// crate. It's needed so that it can implement the Encodable -// trait which is required by Servo. +//! Provides a wrapper around the Atom type in the string cache +//! crate. It's needed so that it can implement the Encodable +//! trait which is required by Servo. use serialize::{Encoder, Encodable}; use std::fmt; @@ -17,9 +17,9 @@ pub struct Atom { impl Atom { #[inline(always)] - pub fn from_slice(string_to_add: &str) -> Atom { + pub fn from_slice(slice: &str) -> Atom { Atom { - atom: atom::Atom::from_slice(string_to_add) + atom: atom::Atom::from_slice(slice) } } }