diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-01-09 07:15:52 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-01-09 07:15:52 -0700 |
commit | f74d5360ba30ec7aaa12f675eb267fd11053d8a8 (patch) | |
tree | d94e48c808c752a66809f3c1cf504ce89e8a6592 /components/script/dom/element.rs | |
parent | c338dbe947660c1647fa8c2eb4f2f57b0c4fadc3 (diff) | |
parent | edc1d892517e90d95b566c17acc7a3df63e24790 (diff) | |
download | servo-f74d5360ba30ec7aaa12f675eb267fd11053d8a8.tar.gz servo-f74d5360ba30ec7aaa12f675eb267fd11053d8a8.zip |
auto merge of #4584 : Ms2ger/servo/unsafe, r=jdm
As a first start, this allows them indiscriminately where used.
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r-- | components/script/dom/element.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index ec43612be70..df99f4dc91d 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -1283,12 +1283,14 @@ impl<'a> VirtualMethods for JSRef<'a, Element> { } impl<'a> style::TElement<'a> for JSRef<'a, Element> { + #[allow(unsafe_blocks)] fn get_attr(self, namespace: &Namespace, attr: &Atom) -> Option<&'a str> { self.get_attribute(namespace.clone(), attr).root().map(|attr| { // This transmute is used to cheat the lifetime restriction. unsafe { mem::transmute(attr.r().value().as_slice()) } }) } + #[allow(unsafe_blocks)] fn get_attrs(self, attr: &Atom) -> Vec<&'a str> { self.get_attributes(attr).into_iter().map(|attr| attr.root()).map(|attr| { // This transmute is used to cheat the lifetime restriction. |