@@ -59,6 +59,7 @@ pub(crate) mod container_dirs {
59
59
60
60
/// Error happened while executing a command.
61
61
#[ derive( Debug , Fail ) ]
62
+ #[ non_exhaustive]
62
63
pub enum CommandError {
63
64
/// The command didn't output anything to stdout or stderr for more than the timeout, and it
64
65
/// was killed. The timeout's value (in seconds) is the first value.
@@ -71,12 +72,10 @@ pub enum CommandError {
71
72
/// The sandbox ran out of memory and was killed.
72
73
#[ fail( display = "container ran out of memory" ) ]
73
74
SandboxOOM ,
74
- #[ doc( hidden) ]
75
- #[ fail( display = "this error shouldn't have happened" ) ]
76
- __NonExaustive,
77
75
}
78
76
79
77
/// Name and kind of a binary executed by [`Command`](struct.Command.html).
78
+ #[ non_exhaustive]
80
79
pub enum Binary {
81
80
/// Global binary, available in `$PATH`. Rustwide doesn't apply any tweaks to its execution
82
81
/// environment.
@@ -85,8 +84,6 @@ pub enum Binary {
85
84
/// tweak the environment to use the local rustup instead of the host system one, and will
86
85
/// search the binary in the cargo home.
87
86
ManagedByRustwide ( PathBuf ) ,
88
- #[ doc( hidden) ]
89
- __NonExaustive,
90
87
}
91
88
92
89
/// Trait representing a command that can be run by [`Command`](struct.Command.html).
@@ -313,7 +310,6 @@ impl<'w, 'pl> Command<'w, 'pl> {
313
310
Binary :: ManagedByRustwide ( path) => {
314
311
container_dirs:: CARGO_BIN_DIR . join ( exe_suffix ( path. as_os_str ( ) ) )
315
312
}
316
- Binary :: __NonExaustive => panic ! ( "do not create __NonExaustive variants manually" ) ,
317
313
} ;
318
314
319
315
let mut cmd = Vec :: new ( ) ;
@@ -382,7 +378,6 @@ impl<'w, 'pl> Command<'w, 'pl> {
382
378
// `cargo_home()` might a relative path
383
379
( crate :: utils:: normalize_path ( & binary) , true )
384
380
}
385
- Binary :: __NonExaustive => panic ! ( "do not create __NonExaustive variants manually" ) ,
386
381
} ;
387
382
388
383
let mut cmd = AsyncCommand :: new ( & binary) ;
0 commit comments