Use eq() and eq_slice() less, and map_default() more.

This commit is contained in:
Ms2ger 2014-02-16 10:24:24 +01:00
parent ecc07e3b49
commit e45b7fa22d
7 changed files with 35 additions and 40 deletions

View file

@ -27,7 +27,6 @@ use std::cast;
use std::cell::RefCell;
use std::comm::{Port, SharedChan};
use std::from_str::FromStr;
use std::str::eq_slice;
use std::str;
use style::Stylesheet;
@ -37,7 +36,7 @@ macro_rules! handle_element(
$string: expr,
$ctor: ident
$(, $arg:expr )*) => (
if eq_slice($localName, $string) {
if $string == $localName {
return $ctor::new($localName, $document $(, $arg)*);
}
)