Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit cab4763

Browse files
committed
Activate all doctests
1 parent 5fafe06 commit cab4763

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/quick_main.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/// Convenient wrapper to be able to use `try!` and such in the main. You can
22
/// use it with a separated function:
33
///
4-
/// ```ignore
4+
/// ```
55
/// # #[macro_use] extern crate error_chain;
66
/// # error_chain! {}
7+
/// # fn main() {
78
/// quick_main!(run);
9+
/// # }
810
///
911
/// fn run() -> Result<()> {
1012
/// Err("error".into())
@@ -13,22 +15,26 @@
1315
///
1416
/// or with a closure:
1517
///
16-
/// ```ignore
18+
/// ```
1719
/// # #[macro_use] extern crate error_chain;
1820
/// # error_chain! {}
21+
/// # fn main() {
1922
/// quick_main!(|| -> Result<()> {
2023
/// Err("error".into())
2124
/// });
25+
/// # }
2226
/// ```
2327
///
2428
/// You can also set the exit value of the process by returning a type that implements [`ExitCode`](trait.ExitCode.html):
2529
///
26-
/// ```ignore
30+
/// ```
2731
/// # #[macro_use] extern crate error_chain;
2832
/// # error_chain! {}
33+
/// # fn main() {
2934
/// quick_main!(run);
35+
/// # }
3036
///
31-
/// fn run() -> Result<u32> {
37+
/// fn run() -> Result<i32> {
3238
/// Err("error".into())
3339
/// }
3440
/// ```

0 commit comments

Comments
 (0)