aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/cell.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-09-04 08:55:51 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-09-04 08:55:51 +0530
commit54c036cd66f6c9a59610fb804d57a63ab7aad19f (patch)
tree08d14c8c8e0ed17ca9da314e22b9ac32d73aaf00 /components/script/dom/bindings/cell.rs
parent35dd1816a9ea90484ae91ecce3a3e7eb094227c1 (diff)
downloadservo-54c036cd66f6c9a59610fb804d57a63ab7aad19f.tar.gz
servo-54c036cd66f6c9a59610fb804d57a63ab7aad19f.zip
Elide most 'a lifetimes
Diffstat (limited to 'components/script/dom/bindings/cell.rs')
-rw-r--r--components/script/dom/bindings/cell.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/bindings/cell.rs b/components/script/dom/bindings/cell.rs
index 80bab8839bc..e2cbe4bfef5 100644
--- a/components/script/dom/bindings/cell.rs
+++ b/components/script/dom/bindings/cell.rs
@@ -29,7 +29,7 @@ impl<T> DOMRefCell<T> {
///
/// For use in the layout task only.
#[allow(unsafe_code)]
- pub unsafe fn borrow_for_layout<'a>(&'a self) -> &'a T {
+ pub unsafe fn borrow_for_layout(&self) -> &T {
debug_assert!(task_state::get().is_layout());
&*self.value.as_unsafe_cell().get()
}
@@ -39,7 +39,7 @@ impl<T> DOMRefCell<T> {
/// This succeeds even if the object is mutably borrowed,
/// so you have to be careful in trace code!
#[allow(unsafe_code)]
- pub unsafe fn borrow_for_gc_trace<'a>(&'a self) -> &'a T {
+ pub unsafe fn borrow_for_gc_trace(&self) -> &T {
// FIXME: IN_GC isn't reliable enough - doesn't catch minor GCs
// https://github.com/servo/servo/issues/6389
//debug_assert!(task_state::get().contains(SCRIPT | IN_GC));
@@ -49,7 +49,7 @@ impl<T> DOMRefCell<T> {
/// Borrow the contents for the purpose of script deallocation.
///
#[allow(unsafe_code)]
- pub unsafe fn borrow_for_script_deallocation<'a>(&'a self) -> &'a mut T {
+ pub unsafe fn borrow_for_script_deallocation(&self) -> &mut T {
debug_assert!(task_state::get().contains(SCRIPT));
&mut *self.value.as_unsafe_cell().get()
}
@@ -71,7 +71,7 @@ impl<T> DOMRefCell<T> {
/// # Panics
///
/// Panics if this is called off the script thread.
- pub fn try_borrow<'a>(&'a self) -> Option<Ref<'a, T>> {
+ pub fn try_borrow(&self) -> Option<Ref<T>> {
debug_assert!(task_state::get().is_script());
match self.value.borrow_state() {
BorrowState::Writing => None,
@@ -89,7 +89,7 @@ impl<T> DOMRefCell<T> {
/// # Panics
///
/// Panics if this is called off the script thread.
- pub fn try_borrow_mut<'a>(&'a self) -> Option<RefMut<'a, T>> {
+ pub fn try_borrow_mut(&self) -> Option<RefMut<T>> {
debug_assert!(task_state::get().is_script());
match self.value.borrow_state() {
BorrowState::Unused => Some(self.value.borrow_mut()),
@@ -127,7 +127,7 @@ impl<T> DOMRefCell<T> {
/// Panics if this is called off the script thread.
///
/// Panics if the value is currently mutably borrowed.
- pub fn borrow<'a>(&'a self) -> Ref<'a, T> {
+ pub fn borrow(&self) -> Ref<T> {
self.try_borrow().expect("DOMRefCell<T> already mutably borrowed")
}
@@ -141,7 +141,7 @@ impl<T> DOMRefCell<T> {
/// Panics if this is called off the script thread.
///
/// Panics if the value is currently borrowed.
- pub fn borrow_mut<'a>(&'a self) -> RefMut<'a, T> {
+ pub fn borrow_mut(&self) -> RefMut<T> {
self.try_borrow_mut().expect("DOMRefCell<T> already borrowed")
}
}