Elide most 'b lifetimes

This commit is contained in:
Manish Goregaokar 2015-09-04 09:02:12 +05:30
parent 54c036cd66
commit 2e02ea38fc
4 changed files with 6 additions and 6 deletions

View file

@ -1224,7 +1224,7 @@ impl Fragment {
} }
#[inline(always)] #[inline(always)]
pub fn style<'a>(&'a self) -> &'a ComputedValues { pub fn style(&self) -> &ComputedValues {
&*self.style &*self.style
} }

View file

@ -204,7 +204,7 @@ impl<'a> Reflectable for GlobalRef<'a> {
impl GlobalRoot { impl GlobalRoot {
/// Obtain a safe reference to the global object that cannot outlive the /// Obtain a safe reference to the global object that cannot outlive the
/// lifetime of this root. /// lifetime of this root.
pub fn r<'c>(&'c self) -> GlobalRef<'c> { pub fn r(&self) -> GlobalRef {
match *self { match *self {
GlobalRoot::Window(ref window) => GlobalRef::Window(window.r()), GlobalRoot::Window(ref window) => GlobalRef::Window(window.r()),
GlobalRoot::Worker(ref worker) => GlobalRef::Worker(worker.r()), GlobalRoot::Worker(ref worker) => GlobalRef::Worker(worker.r()),

View file

@ -13,8 +13,8 @@ use dom::node::Node;
use dom::virtualmethods::vtable_for; use dom::virtualmethods::vtable_for;
// See https://dom.spec.whatwg.org/#concept-event-dispatch for the full dispatch algorithm // See https://dom.spec.whatwg.org/#concept-event-dispatch for the full dispatch algorithm
pub fn dispatch_event<'b>(target: &EventTarget, pub fn dispatch_event(target: &EventTarget,
pseudo_target: Option<&'b EventTarget>, pseudo_target: Option<&EventTarget>,
event: &Event) -> bool { event: &Event) -> bool {
assert!(!event.dispatching()); assert!(!event.dispatching());
assert!(event.initialized()); assert!(event.initialized());

View file

@ -356,8 +356,8 @@ fn broadcast_radio_checked(broadcaster: &HTMLInputElement, group: Option<&str>)
do_broadcast(doc_node, broadcaster, owner.r(), group) do_broadcast(doc_node, broadcaster, owner.r(), group)
} }
fn in_same_group<'b>(other: &HTMLInputElement, fn in_same_group(other: &HTMLInputElement,
owner: Option<&'b HTMLFormElement>, owner: Option<&HTMLFormElement>,
group: Option<&str>) -> bool { group: Option<&str>) -> bool {
let other_owner = other.form_owner(); let other_owner = other.form_owner();
let other_owner = other_owner.r(); let other_owner = other_owner.r();