aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_debug.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-02-10 02:35:26 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2017-02-18 21:09:46 +0100
commitfe3f4ff0c2c7f06be0b4fb4214d1cb86b1e796d8 (patch)
tree7f8a1627a61298f745978a65e966d3674bffae6d /components/layout/layout_debug.rs
parent26d6c96b18c02c02522d706e9ce5e24ee381a45e (diff)
downloadservo-fe3f4ff0c2c7f06be0b4fb4214d1cb86b1e796d8.tar.gz
servo-fe3f4ff0c2c7f06be0b4fb4214d1cb86b1e796d8.zip
Update serde to 0.9 (fixes #15325)
Diffstat (limited to 'components/layout/layout_debug.rs')
-rw-r--r--components/layout/layout_debug.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs
index 9b67077add0..84ee68becc2 100644
--- a/components/layout/layout_debug.rs
+++ b/components/layout/layout_debug.rs
@@ -63,7 +63,7 @@ impl Scope {
pub fn new(name: String) -> Scope {
STATE_KEY.with(|ref r| {
if let Some(ref mut state) = *r.borrow_mut() {
- let flow_trace = to_value(&flow::base(&*state.flow_root));
+ let flow_trace = to_value(&flow::base(&*state.flow_root)).unwrap();
let data = box ScopeData::new(name.clone(), flow_trace);
state.scope_stack.push(data);
}
@@ -78,7 +78,7 @@ impl Drop for Scope {
STATE_KEY.with(|ref r| {
if let Some(ref mut state) = *r.borrow_mut() {
let mut current_scope = state.scope_stack.pop().unwrap();
- current_scope.post = to_value(&flow::base(&*state.flow_root));
+ current_scope.post = to_value(&flow::base(&*state.flow_root)).unwrap();
let previous_scope = state.scope_stack.last_mut().unwrap();
previous_scope.children.push(current_scope);
}
@@ -100,7 +100,7 @@ pub fn begin_trace(flow_root: FlowRef) {
assert!(STATE_KEY.with(|ref r| r.borrow().is_none()));
STATE_KEY.with(|ref r| {
- let flow_trace = to_value(&flow::base(&*flow_root));
+ let flow_trace = to_value(&flow::base(&*flow_root)).unwrap();
let state = State {
scope_stack: vec![box ScopeData::new("root".to_owned(), flow_trace)],
flow_root: flow_root.clone(),
@@ -116,7 +116,7 @@ pub fn end_trace(generation: u32) {
let mut thread_state = STATE_KEY.with(|ref r| r.borrow_mut().take().unwrap());
assert!(thread_state.scope_stack.len() == 1);
let mut root_scope = thread_state.scope_stack.pop().unwrap();
- root_scope.post = to_value(&flow::base(&*thread_state.flow_root));
+ root_scope.post = to_value(&flow::base(&*thread_state.flow_root)).unwrap();
let result = to_string(&root_scope).unwrap();
let mut file = File::create(format!("layout_trace-{}.json", generation)).unwrap();