Skip to content

Commit 6f575b8

Browse files
authored
fix(harness): Error, rather than crash, on unsupported flags (#113)
2 parents ac719af + 1585d74 commit 6f575b8

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

crates/libtest-json/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
44
#![warn(clippy::print_stderr)]
55
#![warn(clippy::print_stdout)]
6-
#![allow(clippy::todo)]
76

87
pub mod event;
98

crates/libtest2-harness/src/harness.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,16 @@ fn run(
265265
)?;
266266

267267
if opts.no_capture {
268-
todo!("`--no-capture` is not yet supported");
268+
return Err(std::io::Error::new(
269+
std::io::ErrorKind::Unsupported,
270+
"`--no-capture` is not supported at this time",
271+
));
269272
}
270273
if opts.show_output {
271-
todo!("`--show-output` is not yet supported");
274+
return Err(std::io::Error::new(
275+
std::io::ErrorKind::Unsupported,
276+
"`--show-output` is not supported at this time",
277+
));
272278
}
273279

274280
let threads = opts.test_threads.map(|t| t.get()).unwrap_or(1);

crates/libtest2-harness/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2424
// #![warn(clippy::print_stderr)]
2525
// #![warn(clippy::print_stdout)]
26-
#![allow(clippy::todo)]
2726

2827
mod case;
2928
mod context;

0 commit comments

Comments
 (0)