diff options
author | Simon THOBY <git@nightmared.fr> | 2023-01-28 14:57:35 +0100 |
---|---|---|
committer | Simon THOBY <git@nightmared.fr> | 2023-01-28 14:58:14 +0100 |
commit | c7ef0c961cc8c7a7955754a55df3118c74e8bef7 (patch) | |
tree | 7224b042ef1df2add1c4e1aca386e8f7807900ec | |
parent | d5b9ec5185a27414286ee303eb3d21ce3069db09 (diff) |
remove uneeded error types that makes rustables types !Send
-rw-r--r-- | flake.nix | 8 | ||||
-rw-r--r-- | src/error.rs | 6 |
2 files changed, 5 insertions, 9 deletions
@@ -14,11 +14,13 @@ channel = "1.66.0"; sha256 = "S7epLlflwt0d1GZP44u5Xosgf6dRrmr8xxC+Ml2Pq7c="; }; + rust = rustChannel.rust.override { + targets = [ "x86_64-unknown-linux-musl" ]; + }; in { - inherit rustChannel; - rustc = rustChannel.rust; - cargo = rustChannel.rust; + rustc = rust; + cargo = rust; } ); rustDevOverlay = final: prev: { diff --git a/src/error.rs b/src/error.rs index f6b6247..80f06d7 100644 --- a/src/error.rs +++ b/src/error.rs @@ -111,9 +111,6 @@ pub enum DecodeError { #[error("Invalid value for a protocol family")] UnknownProtocolFamily(i32), - - #[error("A custom error occured")] - Custom(Box<dyn std::error::Error + 'static>), } #[derive(thiserror::Error, Debug)] @@ -157,9 +154,6 @@ pub enum QueryError { #[error("Error received from the kernel")] NetlinkError(nlmsgerr), - #[error("Custom error when customizing the query")] - InitError(#[from] Box<dyn std::error::Error + Send + 'static>), - #[error("Couldn't allocate a netlink object, out of memory ?")] NetlinkAllocationFailed, |