Replace optional error variant in return types
This patch replaces the Result<_, Optionanyhow::Error> with a proper error.
This simplifies the setup code a bit. The only changed behaviour is that
when rad does not exit successfully, an error is returned instead of
Some(error), which does not alter the behaviour of this binary, because
it would exit the process anyways, but now “rad binary failed” is
printed as well.
2 files changed
+11
-17
a2de36dd
→
7a1ba859
modified bin/main.rs
@@ -54,12 +54,10 @@ enum Command {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -150,15 +148,13 @@ fn print_help() -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -182,7 +178,7 @@ fn run(command: Command) -> Result<(), Option<anyhow::Error>> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified bin/terminal.rs
@@ -2,27 +2,25 @@ use std::ffi::OsString;
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -30,7 +28,7 @@ fn _run_rad(args: &[OsString]) -> Result<(), Option<anyhow::Error>> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|