I think this is:

    do attrs.iter().find |attr| {
        eq_slice(attr.local_name(), name) && attr.namespace == namespace
    }