Skip to content

Commit

Permalink
Infer types when appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwu committed Oct 30, 2015
1 parent 1dfc048 commit 7e786fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/script/dom/element.rs
Expand Up @@ -189,7 +189,7 @@ pub unsafe fn get_attr_for_layout<'a>(elem: &'a Element, namespace: &Namespace,
-> Option<LayoutJS<Attr>> {
// cast to point to T in RefCell<T> directly
let attrs = elem.attrs.borrow_for_layout();
attrs.iter().find(|attr: & &JS<Attr>| {
attrs.iter().find(|attr| {
let attr = attr.to_layout();
*name == attr.local_name_atom_forever() &&
(*attr.unsafe_get()).namespace() == namespace
Expand All @@ -216,7 +216,7 @@ impl RawLayoutElementHelpers for Element {
#[inline]
unsafe fn get_attr_vals_for_layout<'a>(&'a self, name: &Atom) -> Vec<&'a str> {
let attrs = self.attrs.borrow_for_layout();
(*attrs).iter().filter_map(|attr: &JS<Attr>| {
attrs.iter().filter_map(|attr| {
let attr = attr.to_layout();
if *name == attr.local_name_atom_forever() {
Some(attr.value_ref_forever())
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/xmlhttprequest.rs
Expand Up @@ -881,7 +881,7 @@ impl XMLHttpRequest {
_ => "error",
};

let upload_complete: &Cell<bool> = &self.upload_complete;
let upload_complete = &self.upload_complete;
if !upload_complete.get() {
upload_complete.set(true);
self.dispatch_upload_progress_event("progress".to_owned(), None);
Expand Down

0 comments on commit 7e786fb

Please sign in to comment.