aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/namespace.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2013-11-09 21:30:41 +0100
committerMs2ger <ms2ger@gmail.com>2013-11-12 13:32:53 +0100
commit803cd4b7cfa0e846d5fa89be04ef4140e6f1a7d2 (patch)
treece2deda718150aeffbd8826a4550b2ada9f34f34 /src/components/script/dom/namespace.rs
parent2975cb69e3bb4784647a5b7f6d5d4dac7b8241cf (diff)
downloadservo-803cd4b7cfa0e846d5fa89be04ef4140e6f1a7d2.tar.gz
servo-803cd4b7cfa0e846d5fa89be04ef4140e6f1a7d2.zip
Make DOMString represent a non-nullable string.
Diffstat (limited to 'src/components/script/dom/namespace.rs')
-rw-r--r--src/components/script/dom/namespace.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/script/dom/namespace.rs b/src/components/script/dom/namespace.rs
index 7fe8e68e232..5603c67f410 100644
--- a/src/components/script/dom/namespace.rs
+++ b/src/components/script/dom/namespace.rs
@@ -17,7 +17,7 @@ pub enum Namespace {
}
impl Namespace {
- pub fn from_str(url: &DOMString) -> Namespace {
+ pub fn from_str(url: &Option<DOMString>) -> Namespace {
match null_str_as_empty_ref(url) {
&"http://www.w3.org/1999/xhtml" => HTML,
&"http://www.w3.org/XML/1998/namespace" => XML,
@@ -29,7 +29,7 @@ impl Namespace {
ns => Other(ns.to_owned())
}
}
- pub fn to_str(&self) -> DOMString {
+ pub fn to_str(&self) -> Option<DOMString> {
match *self {
Null => None,
HTML => Some(~"http://www.w3.org/1999/xhtml"),