Skip to content

Commit

Permalink
Don't ignore doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored and tommilligan committed Feb 10, 2021
1 parent 2528438 commit 2315f2b
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/lib.rs
Expand Up @@ -14,31 +14,29 @@
//!
//! Yep — and you only need **one line of code** to make it happen:
//!
//! ```rust,ignore
//! ```rust
//! use pretty_assertions::{assert_eq, assert_ne};
//! ```
//!
//! <details>
//! <summary>Show the example behind the screenshots above.</summary>
//!
//! ```rust,ignore
//! ```rust,should_panic
//! // 1. add the `pretty_assertions` dependency to `Cargo.toml`.
//! // 2. insert this line at the top of each module, as needed
//! use pretty_assertions::{assert_eq, assert_ne};
//!
//! fn main() {
//! #[derive(Debug, PartialEq)]
//! struct Foo {
//! lorem: &'static str,
//! ipsum: u32,
//! dolor: Result<String, String>,
//! }
//! #[derive(Debug, PartialEq)]
//! struct Foo {
//! lorem: &'static str,
//! ipsum: u32,
//! dolor: Result<String, String>,
//! }
//!
//! let x = Some(Foo { lorem: "Hello World!", ipsum: 42, dolor: Ok("hey".to_string())});
//! let y = Some(Foo { lorem: "Hello Wrold!", ipsum: 42, dolor: Ok("hey ho!".to_string())});
//! let x = Some(Foo { lorem: "Hello World!", ipsum: 42, dolor: Ok("hey".to_string())});
//! let y = Some(Foo { lorem: "Hello Wrold!", ipsum: 42, dolor: Ok("hey ho!".to_string())});
//!
//! assert_eq!(x, y);
//! }
//! assert_eq!(x, y);
//! ```
//! </details>
//!
Expand All @@ -50,7 +48,7 @@
//!
//! Also add `#[cfg(test)]` to your `use` statements, like this:
//!
//! ```rust,ignore
//! ```rust
//! #[cfg(test)]
//! use pretty_assertions::{assert_eq, assert_ne};
//! ```
Expand Down

0 comments on commit 2315f2b

Please sign in to comment.