aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_debug.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-09-04 10:51:24 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-09-04 18:30:46 +0530
commit8e2c37a542e6bb96681e78977aedaaf675236922 (patch)
treec17f68a4c3eaf7e58c1355325a48ea2e78139ecb /components/layout/layout_debug.rs
parent5c24da3e2d01b5c583d8def9936a5355b3c27f87 (diff)
downloadservo-8e2c37a542e6bb96681e78977aedaaf675236922.tar.gz
servo-8e2c37a542e6bb96681e78977aedaaf675236922.zip
Fix match_refs and let_returns in layout, address review changes
Diffstat (limited to 'components/layout/layout_debug.rs')
-rw-r--r--components/layout/layout_debug.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs
index 3bc7ef8bf6b..93e68f7fbe0 100644
--- a/components/layout/layout_debug.rs
+++ b/components/layout/layout_debug.rs
@@ -63,13 +63,13 @@ struct State {
impl Scope {
pub fn new(name: String) -> Scope {
STATE_KEY.with(|ref r| {
- match &mut *r.borrow_mut() {
- &mut Some(ref mut state) => {
+ match *r.borrow_mut() {
+ Some(ref mut state) => {
let flow_trace = json::encode(&flow::base(&*state.flow_root)).unwrap();
let data = box ScopeData::new(name.clone(), flow_trace);
state.scope_stack.push(data);
}
- &mut None => {}
+ None => {}
}
});
Scope
@@ -80,14 +80,14 @@ impl Scope {
impl Drop for Scope {
fn drop(&mut self) {
STATE_KEY.with(|ref r| {
- match &mut *r.borrow_mut() {
- &mut Some(ref mut state) => {
+ match *r.borrow_mut() {
+ Some(ref mut state) => {
let mut current_scope = state.scope_stack.pop().unwrap();
current_scope.post = json::encode(&flow::base(&*state.flow_root)).unwrap();
let previous_scope = state.scope_stack.last_mut().unwrap();
previous_scope.children.push(current_scope);
}
- &mut None => {}
+ None => {}
}
});
}