Skip to content

Commit

Permalink
Update for rename of core::fmt::Show to core::fmt::Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
aroben committed Jan 27, 2015
1 parent 0214c23 commit 5fbf888
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion macros/src/match_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ type Tokens = Vec<ast::TokenTree>;
type TagName = ast::Ident;

// FIXME: duplicated in src/tokenizer/interface.rs
#[derive(PartialEq, Eq, Hash, Copy, Clone, Show)]
#[derive(PartialEq, Eq, Hash, Copy, Clone, Debug)]
enum TagKind {
StartTag,
EndTag,
Expand Down
2 changes: 1 addition & 1 deletion src/sink/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use string_cache::QualName;
pub use self::NodeEnum::{Document, Doctype, Text, Comment, Element};

/// The different kinds of nodes in the DOM.
#[derive(Show)]
#[derive(Debug)]
pub enum NodeEnum {
/// The `Document` itself.
Document,
Expand Down
2 changes: 1 addition & 1 deletion src/tokenizer/buffer_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct Buffer {
}

/// Result from `pop_except_from`.
#[derive(PartialEq, Eq, Show)]
#[derive(PartialEq, Eq, Debug)]
pub enum SetResult {
FromSet(char),
NotFromSet(String),
Expand Down
2 changes: 1 addition & 1 deletion src/tokenizer/char_ref/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub enum Status {
Done,
}

#[derive(Show)]
#[derive(Debug)]
enum State {
Begin,
Octothorpe,
Expand Down
10 changes: 5 additions & 5 deletions src/tokenizer/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub use self::Token::{NullCharacterToken, EOFToken, ParseError};

/// A `DOCTYPE` token.
// FIXME: already exists in Servo DOM
#[derive(PartialEq, Eq, Clone, Show)]
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct Doctype {
pub name: Option<String>,
pub public_id: Option<String>,
Expand All @@ -50,20 +50,20 @@ impl Doctype {
/// The tokenizer creates all attributes this way, but the tree
/// builder will adjust certain attribute names inside foreign
/// content (MathML, SVG).
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Show)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Debug)]
pub struct Attribute {
pub name: QualName,
pub value: String,
}

#[derive(PartialEq, Eq, Hash, Copy, Clone, Show)]
#[derive(PartialEq, Eq, Hash, Copy, Clone, Debug)]
pub enum TagKind {
StartTag,
EndTag,
}

/// A tag token.
#[derive(PartialEq, Eq, Clone, Show)]
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct Tag {
pub kind: TagKind,
pub name: Atom,
Expand All @@ -88,7 +88,7 @@ impl Tag {
}
}

#[derive(PartialEq, Eq, Show)]
#[derive(PartialEq, Eq, Debug)]
pub enum Token {
DoctypeToken(Doctype),
TagToken(Tag),
Expand Down
10 changes: 5 additions & 5 deletions src/tokenizer/states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,34 @@ pub use self::RawKind::*;
pub use self::AttrValueKind::*;
pub use self::State::*;

#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Show)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Debug)]
pub enum ScriptEscapeKind {
Escaped,
DoubleEscaped,
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Show)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Debug)]
pub enum DoctypeIdKind {
Public,
System,
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Show)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Debug)]
pub enum RawKind {
Rcdata,
Rawtext,
ScriptData,
ScriptDataEscaped(ScriptEscapeKind),
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Show)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Debug)]
pub enum AttrValueKind {
Unquoted,
SingleQuoted,
DoubleQuoted,
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Show)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Hash, Debug)]
pub enum State {
Data,
Plaintext,
Expand Down
6 changes: 3 additions & 3 deletions src/tree_builder/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use util::str::to_escaped_string;
use core::mem::replace;
use core::iter::{Rev, Enumerate};
use core::slice;
use core::fmt::Show;
use core::fmt::Debug;
use collections::vec::Vec;
use collections::string::String;
use std::borrow::Cow::Borrowed;
Expand Down Expand Up @@ -60,7 +60,7 @@ pub enum PushFlag {

// These go in a trait so that we can control visibility.
pub trait TreeBuilderActions<Handle> {
fn unexpected<T: Show>(&mut self, thing: &T) -> ProcessResult;
fn unexpected<T: Debug>(&mut self, thing: &T) -> ProcessResult;
fn assert_named(&mut self, node: Handle, name: Atom);
fn clear_active_formatting_to_marker(&mut self);
fn create_formatting_element_for(&mut self, tag: Tag) -> Handle;
Expand Down Expand Up @@ -115,7 +115,7 @@ impl<Handle, Sink> TreeBuilderActions<Handle>
where Handle: Clone,
Sink: TreeSink<Handle=Handle>,
{
fn unexpected<T: Show>(&mut self, _thing: &T) -> ProcessResult {
fn unexpected<T: Debug>(&mut self, _thing: &T) -> ProcessResult {
self.sink.parse_error(format_if!(
self.opts.exact_errors,
"Unexpected token",
Expand Down
2 changes: 1 addition & 1 deletion src/tree_builder/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub use self::QuirksMode::{Quirks, LimitedQuirks, NoQuirks};
pub use self::NodeOrText::{AppendNode, AppendText};

/// A document's quirks mode.
#[derive(PartialEq, Eq, Copy, Clone, Hash, Show)]
#[derive(PartialEq, Eq, Copy, Clone, Hash, Debug)]
pub enum QuirksMode {
Quirks,
LimitedQuirks,
Expand Down
6 changes: 3 additions & 3 deletions src/tree_builder/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub use self::Token::*;
pub use self::ProcessResult::*;
pub use self::FormatEntry::*;

#[derive(PartialEq, Eq, Copy, Clone, Show)]
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
pub enum InsertionMode {
Initial,
BeforeHtml,
Expand All @@ -48,7 +48,7 @@ pub enum InsertionMode {
AfterAfterFrameset,
}

#[derive(PartialEq, Eq, Copy, Clone, Show)]
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
pub enum SplitStatus {
NotSplit,
Whitespace,
Expand All @@ -57,7 +57,7 @@ pub enum SplitStatus {

/// A subset/refinement of `tokenizer::Token`. Everything else is handled
/// specially at the beginning of `process_token`.
#[derive(PartialEq, Eq, Clone, Show)]
#[derive(PartialEq, Eq, Clone, Debug)]
pub enum Token {
TagToken(Tag),
CommentToken(String),
Expand Down
4 changes: 2 additions & 2 deletions src/util/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ use collections::vec::Vec;
use collections::string::String;

#[cfg(not(for_c))]
use core::fmt::Show;
use core::fmt::Debug;

#[cfg(not(for_c))]
pub fn to_escaped_string<T: Show>(x: &T) -> String {
pub fn to_escaped_string<T: Debug>(x: &T) -> String {
use collections::str::StrExt;
use core::fmt::Writer;

Expand Down

0 comments on commit 5fbf888

Please sign in to comment.