aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorLeo Lahti <leo.lahti1@gmail.com>2015-10-19 19:28:44 +0000
committerLeo Lahti <leo.lahti1@gmail.com>2015-10-20 09:11:06 +0300
commit89e8a26539adce58d7ec1dbbbcd41df0924ec909 (patch)
tree586474194aa6902fb2d09da5a3bf3f3948924ad5 /components/script/dom/node.rs
parent1a376aa75d5de8781b17a673850860f8afd2c28f (diff)
downloadservo-89e8a26539adce58d7ec1dbbbcd41df0924ec909.tar.gz
servo-89e8a26539adce58d7ec1dbbbcd41df0924ec909.zip
Removed unsafe from 'query_selector_iter'
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 034b8dfc3db..b50d71ccd10 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -345,8 +345,7 @@ pub struct QuerySelectorIterator {
}
impl<'a> QuerySelectorIterator {
- #[allow(unsafe_code)]
- unsafe fn new(iter: TreeIterator, selectors: Vec<Selector>)
+ fn new(iter: TreeIterator, selectors: Vec<Selector>)
-> QuerySelectorIterator {
QuerySelectorIterator {
selectors: selectors,
@@ -737,8 +736,7 @@ impl Node {
/// Get an iterator over all nodes which match a set of selectors
/// Be careful not to do anything which may manipulate the DOM tree
/// whilst iterating, otherwise the iterator may be invalidated.
- #[allow(unsafe_code)]
- pub unsafe fn query_selector_iter(&self, selectors: DOMString)
+ pub fn query_selector_iter(&self, selectors: DOMString)
-> Fallible<QuerySelectorIterator> {
// Step 1.
match parse_author_origin_selector_list_from_str(&selectors) {
@@ -755,7 +753,7 @@ impl Node {
#[allow(unsafe_code)]
pub fn query_selector_all(&self, selectors: DOMString) -> Fallible<Root<NodeList>> {
let window = window_from_node(self);
- let iter = try!(unsafe { self.query_selector_iter(selectors) });
+ let iter = try!(self.query_selector_iter(selectors));
Ok(NodeList::new_simple_list(window.r(), iter))
}