Round 3 test fixes and conflicts
This commit is contained in:
@@ -275,15 +275,12 @@
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
#![feature(int_uint)]
|
||||
#![feature(collections)]
|
||||
#![feature(core)]
|
||||
#![feature(old_io)]
|
||||
|
||||
use self::LabelText::*;
|
||||
|
||||
use std::borrow::IntoCow;
|
||||
use std::borrow::{IntoCow, Cow};
|
||||
use std::old_io;
|
||||
use std::string::CowString;
|
||||
use std::vec::CowVec;
|
||||
|
||||
/// The text for a graphviz label on a node or edge.
|
||||
pub enum LabelText<'a> {
|
||||
@@ -291,7 +288,7 @@ pub enum LabelText<'a> {
|
||||
///
|
||||
/// Occurrences of backslashes (`\`) are escaped, and thus appear
|
||||
/// as backslashes in the rendered label.
|
||||
LabelStr(CowString<'a>),
|
||||
LabelStr(Cow<'a, str>),
|
||||
|
||||
/// This kind of label uses the graphviz label escString type:
|
||||
/// http://www.graphviz.org/content/attrs#kescString
|
||||
@@ -303,7 +300,7 @@ pub enum LabelText<'a> {
|
||||
/// to break a line (centering the line preceding the `\n`), there
|
||||
/// are also the escape sequences `\l` which left-justifies the
|
||||
/// preceding line and `\r` which right-justifies it.
|
||||
EscStr(CowString<'a>),
|
||||
EscStr(Cow<'a, str>),
|
||||
}
|
||||
|
||||
// There is a tension in the design of the labelling API.
|
||||
@@ -340,7 +337,7 @@ pub enum LabelText<'a> {
|
||||
|
||||
/// `Id` is a Graphviz `ID`.
|
||||
pub struct Id<'a> {
|
||||
name: CowString<'a>,
|
||||
name: Cow<'a, str>,
|
||||
}
|
||||
|
||||
impl<'a> Id<'a> {
|
||||
@@ -387,7 +384,7 @@ impl<'a> Id<'a> {
|
||||
&*self.name
|
||||
}
|
||||
|
||||
pub fn name(self) -> CowString<'a> {
|
||||
pub fn name(self) -> Cow<'a, str> {
|
||||
self.name
|
||||
}
|
||||
}
|
||||
@@ -463,7 +460,7 @@ impl<'a> LabelText<'a> {
|
||||
/// yields same content as self. The result obeys the law
|
||||
/// render(`lt`) == render(`EscStr(lt.pre_escaped_content())`) for
|
||||
/// all `lt: LabelText`.
|
||||
fn pre_escaped_content(self) -> CowString<'a> {
|
||||
fn pre_escaped_content(self) -> Cow<'a, str> {
|
||||
match self {
|
||||
EscStr(s) => s,
|
||||
LabelStr(s) => if s.contains_char('\\') {
|
||||
@@ -489,8 +486,8 @@ impl<'a> LabelText<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub type Nodes<'a,N> = CowVec<'a,N>;
|
||||
pub type Edges<'a,E> = CowVec<'a,E>;
|
||||
pub type Nodes<'a,N> = Cow<'a,[N]>;
|
||||
pub type Edges<'a,E> = Cow<'a,[E]>;
|
||||
|
||||
// (The type parameters in GraphWalk should be associated items,
|
||||
// when/if Rust supports such.)
|
||||
|
||||
Reference in New Issue
Block a user