Merge pull request #20457 from frewsxcv/rm-reexports

Remove graphviz::LabelText::* public reexport

Reviewed-by: cmr
This commit is contained in:
bors 2015-01-04 21:36:36 +00:00
commit 56795ad8c3
3 changed files with 14 additions and 14 deletions

View File

@ -168,10 +168,10 @@
//! dot::Id::new(format!("N{}", n)).unwrap() //! dot::Id::new(format!("N{}", n)).unwrap()
//! } //! }
//! fn node_label<'b>(&'b self, n: &Nd) -> dot::LabelText<'b> { //! fn node_label<'b>(&'b self, n: &Nd) -> dot::LabelText<'b> {
//! dot::LabelStr(self.nodes[*n].as_slice().into_cow()) //! dot::LabelText::LabelStr(self.nodes[*n].as_slice().into_cow())
//! } //! }
//! fn edge_label<'b>(&'b self, _: &Ed) -> dot::LabelText<'b> { //! fn edge_label<'b>(&'b self, _: &Ed) -> dot::LabelText<'b> {
//! dot::LabelStr("&sube;".into_cow()) //! dot::LabelText::LabelStr("&sube;".into_cow())
//! } //! }
//! } //! }
//! //!
@ -225,10 +225,10 @@
//! } //! }
//! fn node_label<'b>(&'b self, n: &Nd<'b>) -> dot::LabelText<'b> { //! fn node_label<'b>(&'b self, n: &Nd<'b>) -> dot::LabelText<'b> {
//! let &(i, _) = n; //! let &(i, _) = n;
//! dot::LabelStr(self.nodes[i].as_slice().into_cow()) //! dot::LabelText::LabelStr(self.nodes[i].as_slice().into_cow())
//! } //! }
//! fn edge_label<'b>(&'b self, _: &Ed<'b>) -> dot::LabelText<'b> { //! fn edge_label<'b>(&'b self, _: &Ed<'b>) -> dot::LabelText<'b> {
//! dot::LabelStr("&sube;".into_cow()) //! dot::LabelText::LabelStr("&sube;".into_cow())
//! } //! }
//! } //! }
//! //!
@ -274,7 +274,7 @@
#![feature(globs, slicing_syntax)] #![feature(globs, slicing_syntax)]
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
pub use self::LabelText::*; use self::LabelText::*;
use std::borrow::IntoCow; use std::borrow::IntoCow;
use std::io; use std::io;
@ -586,8 +586,8 @@ pub fn render_opts<'a, N:Clone+'a, E:Clone+'a, G:Labeller<'a,N,E>+GraphWalk<'a,N
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use self::NodeLabels::*; use self::NodeLabels::*;
use super::{Id, LabelText, LabelStr, EscStr, Labeller}; use super::{Id, Labeller, Nodes, Edges, GraphWalk, render};
use super::{Nodes, Edges, GraphWalk, render}; use super::LabelText::{mod, LabelStr, EscStr};
use std::io::IoResult; use std::io::IoResult;
use std::borrow::IntoCow; use std::borrow::IntoCow;
use std::iter::repeat; use std::iter::repeat;

View File

@ -60,16 +60,16 @@ impl<'a, 'ast> dot::Labeller<'a, Node<'a>, Edge<'a>> for LabelledCFG<'a, 'ast> {
fn node_label(&'a self, &(i, n): &Node<'a>) -> dot::LabelText<'a> { fn node_label(&'a self, &(i, n): &Node<'a>) -> dot::LabelText<'a> {
if i == self.cfg.entry { if i == self.cfg.entry {
dot::LabelStr("entry".into_cow()) dot::LabelText::LabelStr("entry".into_cow())
} else if i == self.cfg.exit { } else if i == self.cfg.exit {
dot::LabelStr("exit".into_cow()) dot::LabelText::LabelStr("exit".into_cow())
} else if n.data.id == ast::DUMMY_NODE_ID { } else if n.data.id == ast::DUMMY_NODE_ID {
dot::LabelStr("(dummy_node)".into_cow()) dot::LabelText::LabelStr("(dummy_node)".into_cow())
} else { } else {
let s = self.ast_map.node_to_string(n.data.id); let s = self.ast_map.node_to_string(n.data.id);
// left-aligns the lines // left-aligns the lines
let s = replace_newline_with_backslash_l(s); let s = replace_newline_with_backslash_l(s);
dot::EscStr(s.into_cow()) dot::LabelText::EscStr(s.into_cow())
} }
} }
@ -87,7 +87,7 @@ impl<'a, 'ast> dot::Labeller<'a, Node<'a>, Edge<'a>> for LabelledCFG<'a, 'ast> {
let s = replace_newline_with_backslash_l(s); let s = replace_newline_with_backslash_l(s);
label.push_str(format!("exiting scope_{} {}", i, s[])[]); label.push_str(format!("exiting scope_{} {}", i, s[])[]);
} }
dot::EscStr(label.into_cow()) dot::LabelText::EscStr(label.into_cow())
} }
} }

View File

@ -137,8 +137,8 @@ impl<'a, 'tcx> dot::Labeller<'a, Node<'a>, Edge<'a>> for DataflowLabeller<'a, 't
let suffix = self.dataflow_for(dataflow::Exit, n); let suffix = self.dataflow_for(dataflow::Exit, n);
let inner_label = self.inner.node_label(n); let inner_label = self.inner.node_label(n);
inner_label inner_label
.prefix_line(dot::LabelStr(prefix.into_cow())) .prefix_line(dot::LabelText::LabelStr(prefix.into_cow()))
.suffix_line(dot::LabelStr(suffix.into_cow())) .suffix_line(dot::LabelText::LabelStr(suffix.into_cow()))
} }
fn edge_label(&'a self, e: &Edge<'a>) -> dot::LabelText<'a> { self.inner.edge_label(e) } fn edge_label(&'a self, e: &Edge<'a>) -> dot::LabelText<'a> { self.inner.edge_label(e) }
} }