feat(serial): replace all panics with error handling from anyhow

Support -h and --help arguments.
Print a better error message when the Orbic device is not found.
Replace every panic! with anyhow::bail!
Replace .expect() with .context()?
Wraps all function returns with anyhow::Result
This commit is contained in:
oopsbagel
2025-04-01 06:46:01 -07:00
committed by Will Greenberg
parent bf8f1fb8eb
commit 3c0716c877
3 changed files with 51 additions and 39 deletions
Generated
+3 -2
View File
@@ -115,9 +115,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.86"
version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
[[package]]
name = "arbitrary"
@@ -1932,6 +1932,7 @@ dependencies = [
name = "serial"
version = "0.2.6"
dependencies = [
"anyhow",
"nusb",
"tokio",
]