aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/layout/flow.rs
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-05-05 15:17:25 -0700
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-05-06 10:01:48 -0700
commit61b7a382953c40c524fc3501b9dc82d32bea8d59 (patch)
treeb9c40cf8732a331a22e3c5c6785044f48945f81e /src/components/main/layout/flow.rs
parent1879bf95ee40c74bf78164f10817d726a7c4c6b9 (diff)
downloadservo-61b7a382953c40c524fc3501b9dc82d32bea8d59.tar.gz
servo-61b7a382953c40c524fc3501b9dc82d32bea8d59.zip
Use fmt::Show for outputting debug information
Diffstat (limited to 'src/components/main/layout/flow.rs')
-rw-r--r--src/components/main/layout/flow.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/components/main/layout/flow.rs b/src/components/main/layout/flow.rs
index 6be1e43adc6..7d79f4faf8f 100644
--- a/src/components/main/layout/flow.rs
+++ b/src/components/main/layout/flow.rs
@@ -55,6 +55,7 @@ use gfx::render_task::RenderLayer;
use servo_msg::compositor_msg::LayerId;
use servo_util::geometry::Au;
use std::cast;
+use std::fmt;
use std::iter::Zip;
use std::num::Zero;
use std::sync::atomics::Relaxed;
@@ -65,7 +66,7 @@ use style::computed_values::{clear, position, text_align};
///
/// Note that virtual methods have a cost; we should not overuse them in Servo. Consider adding
/// methods to `ImmutableFlowUtils` or `MutableFlowUtils` before adding more methods here.
-pub trait Flow {
+pub trait Flow: fmt::Show + ToStr {
// RTTI
//
// TODO(pcwalton): Use Rust's RTTI, once that works.
@@ -267,11 +268,6 @@ pub trait Flow {
LayerId(pointer, fragment_id)
}
}
-
- /// Returns a debugging string describing this flow.
- fn debug_str(&self) -> ~str {
- "???".to_owned()
- }
}
// Base access
@@ -915,7 +911,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
for _ in range(0, level) {
indent.push_str("| ")
}
- debug!("{}+ {}", indent, self.debug_str());
+ debug!("{}+ {}", indent, self.to_str());
for kid in imm_child_iter(self) {
kid.dump_with_level(level + 1)
}