Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
feat: use snafu error implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
doinkythederp committed Dec 24, 2023
1 parent 3457843 commit 4699c6f
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions pros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spin = "0.9.8"
pros-sys = { version = "0.4", path = "../pros-sys", features = ["xapi"] }
snafu = { version = "0.7.5", default-features = false, features = [
"rust_1_61",
"unstable-core-error",
] }
no_std_io = { version = "0.6.0", features = ["alloc"] }
futures = { version = "0.3.28", default-features = false, features = ["alloc"] }
Expand Down
1 change: 0 additions & 1 deletion pros/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ pub enum PortError {
))]
PortCannotBeConfigured,
}
impl core::error::Error for PortError {}

map_errno!(PortError {
ENXIO => Self::PortOutOfRange,
Expand Down
1 change: 0 additions & 1 deletion pros/src/lcd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ pub enum LcdError {
#[snafu(display("LCD not initialized"))]
NotInitialized,
}
impl core::error::Error for LcdError {}
1 change: 0 additions & 1 deletion pros/src/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ pub enum LinkError {
#[snafu(display("{source}"), context(false))]
Port { source: PortError },
}
impl core::error::Error for LinkError {}

map_errno! {
LinkError {
Expand Down
1 change: 0 additions & 1 deletion pros/src/motor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ pub enum MotorError {
#[snafu(display("{source}"), context(false))]
Port { source: PortError },
}
impl core::error::Error for MotorError {}

map_errno! {
MotorError {}
Expand Down
1 change: 0 additions & 1 deletion pros/src/sensors/gps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ pub enum GpsError {
#[snafu(display("{source}"), context(false))]
Port { source: PortError },
}
impl core::error::Error for GpsError {}

map_errno! {
GpsError {
Expand Down
1 change: 0 additions & 1 deletion pros/src/sensors/vision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ pub enum VisionError {
#[snafu(display("{source}"), context(false))]
Port { source: PortError },
}
impl core::error::Error for VisionError {}

map_errno! {
VisionError {
Expand Down

0 comments on commit 4699c6f

Please sign in to comment.