mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix comments and variable names for atom wrapper.
This commit is contained in:
parent
dddd3346a6
commit
560e380767
2 changed files with 6 additions and 6 deletions
|
@ -1273,7 +1273,7 @@ impl Node {
|
||||||
ElementNodeTypeId(..) => {
|
ElementNodeTypeId(..) => {
|
||||||
let element: &JSRef<Element> = ElementCast::to_ref(node).unwrap();
|
let element: &JSRef<Element> = ElementCast::to_ref(node).unwrap();
|
||||||
let element = element.deref();
|
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);
|
element.namespace.clone(), &*document);
|
||||||
NodeCast::from_temporary(element)
|
NodeCast::from_temporary(element)
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// Provides a wrapper around the Atom type in the string cache
|
//! Provides a wrapper around the Atom type in the string cache
|
||||||
// crate. It's needed so that it can implement the Encodable
|
//! crate. It's needed so that it can implement the Encodable
|
||||||
// trait which is required by Servo.
|
//! trait which is required by Servo.
|
||||||
|
|
||||||
use serialize::{Encoder, Encodable};
|
use serialize::{Encoder, Encodable};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
@ -17,9 +17,9 @@ pub struct Atom {
|
||||||
|
|
||||||
impl Atom {
|
impl Atom {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn from_slice(string_to_add: &str) -> Atom {
|
pub fn from_slice(slice: &str) -> Atom {
|
||||||
Atom {
|
Atom {
|
||||||
atom: atom::Atom::from_slice(string_to_add)
|
atom: atom::Atom::from_slice(slice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue