Skip to content

Commit

Permalink
Merge pull request shepmaster#1 from shepmaster/master
Browse files Browse the repository at this point in the history
update fork
  • Loading branch information
ljedrz authored May 28, 2018
2 parents 3a930a9 + c58f757 commit ad25f14
Show file tree
Hide file tree
Showing 9 changed files with 456 additions and 142 deletions.
12 changes: 3 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
language: rust
sudo: false
rust:
- stable
- nightly
- beta
env:
matrix:
- FEATURES=""
- FEATURES="unstable"
global:
secure: WPH3AcdfXVt8QBD5oNTZtBGDqnV4dt9LA0pxJJ0QjJZgZtjp+HfTG+l6NnX+8C8WPLOubYnphTdGg6tOCq/x5wJpltYMUNubF9ivhavyCkG2UfItyuejdjmf7edeHk3maNqY0cml9L/Gh5ysrf3/ti5+LZXzdnX9QhQvoL1TFZg=
matrix:
exclude:
- rust: beta
include:
- rust: nightly
env: FEATURES="unstable"
script: |
cargo build --verbose --features "${FEATURES}"
cargo test --verbose --features "${FEATURES}"
after_success: "./deploy_gh_pages.sh"
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sxd-document"
version = "0.2.0"
version = "0.2.6"
authors = ["Jake Goulding <jake.goulding@gmail.com>"]

description = "A Rust XML DOM library"
Expand Down
9 changes: 4 additions & 5 deletions src/bin/open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ fn process_input<R>(input: R)
panic!("Can't read: {}", x);
}

let package = match parser::parse(&data) {
Ok(d) => d,
Err((point, _)) => panic!("Unable to parse: {}", pretty_error(&data, point)),
};
let package = parser::parse(&data).unwrap_or_else(|e| {
panic!("Unable to parse: {}", pretty_error(&data, e.location()));
});

// let mut out = io::stdout();
let mut out = io::sink();
let d = package.as_document();

sxd_document::writer::format_document(&d, &mut out).ok().expect("I can't output");
sxd_document::writer::format_document(&d, &mut out).expect("I can't output");
// Remove when we move back to stdout_raw + buffer or when stdout flushed at program exit
out.flush().unwrap();
}
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ pub mod writer;

pub use str::XmlChar;

static XML_NS_PREFIX: &'static str = "xml";
static XML_NS_URI: &'static str = "http://www.w3.org/XML/1998/namespace";

/// A prefixed name. This represents what is found in the string form
/// of an XML document, and does not apply any namespace mapping.
#[derive(Debug,Copy,Clone,PartialEq,Eq,PartialOrd,Ord)]
Expand Down
Loading

0 comments on commit ad25f14

Please sign in to comment.