This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ impl DocTestRunner {
113113mod __doctest_mod {{
114114 use std::sync::OnceLock;
115115 use std::path::PathBuf;
116+ use std::process::ExitCode;
116117
117118 pub static BINARY_PATH: OnceLock<PathBuf> = OnceLock::new();
118119 pub const RUN_OPTION: &str = \" RUSTDOC_DOCTEST_RUN_NB_TEST\" ;
@@ -123,16 +124,17 @@ mod __doctest_mod {{
123124 }}
124125
125126 #[allow(unused)]
126- pub fn doctest_runner(bin: &std::path::Path, test_nb: usize) -> Result<(), String> {{
127+ pub fn doctest_runner(bin: &std::path::Path, test_nb: usize) -> ExitCode {{
127128 let out = std::process::Command::new(bin)
128129 .env(self::RUN_OPTION, test_nb.to_string())
129130 .args(std::env::args().skip(1).collect::<Vec<_>>())
130131 .output()
131132 .expect(\" failed to run command\" );
132133 if !out.status.success() {{
133- Err(String::from_utf8_lossy(&out.stderr).to_string())
134+ eprintln!(\" {{}}\" , String::from_utf8_lossy(&out.stderr));
135+ ExitCode::FAILURE
134136 }} else {{
135- Ok(())
137+ ExitCode::SUCCESS
136138 }}
137139 }}
138140}}
You can’t perform that action at this time.
0 commit comments