mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Change Namespace::to_str() to not allocate and return a reference.
This commit is contained in:
parent
28575c20bf
commit
61c7f2f220
5 changed files with 23 additions and 23 deletions
|
@ -129,8 +129,8 @@ impl ElementLike for Element {
|
|||
self.tag_name.as_slice()
|
||||
}
|
||||
|
||||
fn get_namespace<'a>(&'a self) -> ~str {
|
||||
self.namespace.to_str().unwrap_or(~"")
|
||||
fn get_namespace_url<'a>(&'a self) -> &'a str {
|
||||
self.namespace.to_str().unwrap_or("")
|
||||
}
|
||||
|
||||
fn get_attr(&self, name: &str) -> Option<~str> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue