@@ -59,6 +59,7 @@ pub(crate) mod container_dirs {
5959
6060/// Error happened while executing a command.
6161#[ derive( Debug , Fail ) ]
62+ #[ non_exhaustive]
6263pub enum CommandError {
6364 /// The command didn't output anything to stdout or stderr for more than the timeout, and it
6465 /// was killed. The timeout's value (in seconds) is the first value.
@@ -71,12 +72,10 @@ pub enum CommandError {
7172 /// The sandbox ran out of memory and was killed.
7273 #[ fail( display = "container ran out of memory" ) ]
7374 SandboxOOM ,
74- #[ doc( hidden) ]
75- #[ fail( display = "this error shouldn't have happened" ) ]
76- __NonExaustive,
7775}
7876
7977/// Name and kind of a binary executed by [`Command`](struct.Command.html).
78+ #[ non_exhaustive]
8079pub enum Binary {
8180 /// Global binary, available in `$PATH`. Rustwide doesn't apply any tweaks to its execution
8281 /// environment.
@@ -85,8 +84,6 @@ pub enum Binary {
8584 /// tweak the environment to use the local rustup instead of the host system one, and will
8685 /// search the binary in the cargo home.
8786 ManagedByRustwide ( PathBuf ) ,
88- #[ doc( hidden) ]
89- __NonExaustive,
9087}
9188
9289/// Trait representing a command that can be run by [`Command`](struct.Command.html).
@@ -313,7 +310,6 @@ impl<'w, 'pl> Command<'w, 'pl> {
313310 Binary :: ManagedByRustwide ( path) => {
314311 container_dirs:: CARGO_BIN_DIR . join ( exe_suffix ( path. as_os_str ( ) ) )
315312 }
316- Binary :: __NonExaustive => panic ! ( "do not create __NonExaustive variants manually" ) ,
317313 } ;
318314
319315 let mut cmd = Vec :: new ( ) ;
@@ -382,7 +378,6 @@ impl<'w, 'pl> Command<'w, 'pl> {
382378 // `cargo_home()` might a relative path
383379 ( crate :: utils:: normalize_path ( & binary) , true )
384380 }
385- Binary :: __NonExaustive => panic ! ( "do not create __NonExaustive variants manually" ) ,
386381 } ;
387382
388383 let mut cmd = AsyncCommand :: new ( & binary) ;
0 commit comments