Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated for latest Rust #31

Merged
merged 2 commits into from
May 16, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ env:
global:
- secure: XDGzWHMZT3NW4sEihueOjfJm5HXiepe1uNcnfUk85/z634Qmzk/YKrdem7Ta3PwGRz+MdFSkLII0z17UCjcslmAxLRVuAdl6QKOtVeK55YM1hPX18sNcpKd+NWIy8N5PFWELDg8TPzT8Cga5NDYNLlqsdtcBkW1kTK/fl+6NLtc=
before_install:
- yes | sudo add-apt-repository ppa:hansjorg/rust
- sudo apt-get update
install:
- wget http://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz
- tar xzf rust-nightly-x86_64-unknown-linux-gnu.tar.gz
- export PATH=$PATH:$(pwd)/rust-nightly-x86_64-unknown-linux-gnu/bin
- rustc -v
- sudo apt-get install libxml2
- sudo apt-get install rust-nightly
script:
- make
- make clean
Expand Down
2 changes: 1 addition & 1 deletion src/sax/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl ErrorData {

impl fmt::Show for ErrorData {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
write!(fmt.buf, "{}:{} {}: {}",
write!(fmt, "{}:{} {}: {}",
self.line,
self.column,
self.level,
Expand Down
16 changes: 8 additions & 8 deletions src/sax/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ pub enum ParseEvent {
impl fmt::Show for ParseEvent {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match *self {
StartDocument => write!(fmt.buf, "START DOCUMENT"),
EndDocument => write!(fmt.buf, "END DOCUMENT"),
StartElement(ref name, ref atts) => write!(fmt.buf, "<{}{}>", *name, atts),
EndElement(ref name) => write!(fmt.buf, "</{}>", *name),
Characters(ref ch) => write!(fmt.buf, "{}", ch.clone()),
Comment(ref value) => write!(fmt.buf, "<!--{}-->", *value),
CdataBlock(ref value) => write!(fmt.buf, "<![CDATA[{}]]>", *value),
StartDocument => write!(fmt, "START DOCUMENT"),
EndDocument => write!(fmt, "END DOCUMENT"),
StartElement(ref name, ref atts) => write!(fmt, "<{}{}>", *name, atts),
EndElement(ref name) => write!(fmt, "</{}>", *name),
Characters(ref ch) => write!(fmt, "{}", ch.clone()),
Comment(ref value) => write!(fmt, "<!--{}-->", *value),
CdataBlock(ref value) => write!(fmt, "<![CDATA[{}]]>", *value),
}
}
}
Expand Down Expand Up @@ -118,7 +118,7 @@ impl fmt::Show for Attributes {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
let Attributes(ref s) = *self;
for att in s.iter() {
try!(write!(fmt.buf, " {}=\"{}\"", att.name, att.value));
try!(write!(fmt, " {}=\"{}\"", att.name, att.value));
}
Ok(())
}
Expand Down