diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-09-17 13:19:00 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-09-17 13:19:00 -0700 |
commit | 787a68336524fb9585922b9ed319a8b194fb8ee1 (patch) | |
tree | dd766824192dd26a929bd0b2ce0f5e3d9d0b7677 /components/util | |
parent | 61642d64b5c06f30fd68961e5ffd21a35dacbc4c (diff) | |
parent | 874db261046d6155b1942efa106d2e0014295d6d (diff) | |
download | servo-787a68336524fb9585922b9ed319a8b194fb8ee1.tar.gz servo-787a68336524fb9585922b9ed319a8b194fb8ee1.zip |
Merge pull request #3316 from pcwalton/use-atoms
script: Use atom comparison in more places, especially for attributes.
Diffstat (limited to 'components/util')
-rw-r--r-- | components/util/atom.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/util/atom.rs b/components/util/atom.rs index 49cb047768e..14215d66528 100644 --- a/components/util/atom.rs +++ b/components/util/atom.rs @@ -18,6 +18,13 @@ pub struct Atom { impl Atom { #[inline(always)] + pub fn new(atom: atom::Atom) -> Atom { + Atom { + atom: atom, + } + } + + #[inline(always)] pub fn from_slice(slice: &str) -> Atom { Atom { atom: atom::Atom::from_slice(slice) |