Skip to content

Commit c0c101f

Browse files
authored
Merge pull request #22 from goose121/patch-1
Fix top-level doctest
2 parents b4f3f34 + 64e453e commit c0c101f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@
3030
//! ```
3131
//! // ...
3232
//! fn main() {
33-
//! let _exit_code = run(); // logger gets flushed as `run()` returns.
34-
//! // std::process::exit(exit_code) // this needs to be commented or it'll
35-
//! // end the doctest
33+
//! let exit_code = run(); // logger gets flushed as `run()` returns.
34+
//! # if false {
35+
//! # // this must not run or it'll end the doctest
36+
//! std::process::exit(exit_code)
37+
//! # }
3638
//! }
3739
//!
3840
//! fn run() -> i32 {

0 commit comments

Comments
 (0)