Skip to content

Commit

Permalink
Merge pull request #31 from ozkriff/master
Browse files Browse the repository at this point in the history
Updated for latest Rust
  • Loading branch information
brendanzab committed May 16, 2014
2 parents bae5526 + 685fe36 commit e072472
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
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

0 comments on commit e072472

Please sign in to comment.