diff --git a/.travis.yml b/.travis.yml index a597199..90f0de8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ install: script: - cargo test --no-default-features - cargo test - - if [ "$TRAVIS_RUST_VERSION" = 'nightly' ]; then cargo bench --features=bench; fi + - if [ "$TRAVIS_RUST_VERSION" = 'nightly' ]; then cargo test --features bench && cargo bench --features bench; fi - cargo test --target i686-$OS after_success: diff --git a/README.md b/README.md index 68ca04a..9e7a5e7 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ fn main() { .dark_color(svg::Color("#800000")) .light_color(svg::Color("#ffff80")) .build(); - println!("{}", string); + println!("{}", image); } ``` diff --git a/src/lib.rs b/src/lib.rs index 05d1574..1be34bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,12 +29,15 @@ //! } //! ``` -#![cfg_attr(feature = "bench", feature(test))] // Unstable libraries +#![cfg_attr(feature = "bench", feature(test, external_doc))] // Unstable libraries #![cfg_attr(feature = "cargo-clippy", deny(warnings, clippy_pedantic))] #![cfg_attr(feature = "cargo-clippy", allow(unreadable_literal, missing_docs_in_private_items, shadow_reuse, range_plus_one))] +#![cfg_attr(feature = "bench", doc(include = "../README.md"))] +// ^ make sure we can test our README.md. + extern crate checked_int_cast; #[cfg(feature = "image")] extern crate image;