diff --git a/Cargo.lock b/Cargo.lock index a32ea35..f056b8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -467,7 +467,7 @@ dependencies = [ "quinn-proto", "rustls", "socket2", - "thiserror 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio", "tracing", "webpki", @@ -486,7 +486,7 @@ dependencies = [ "rustls", "rustls-native-certs", "slab", - "thiserror 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", "tinyvec", "tracing", "webpki", @@ -741,7 +741,7 @@ dependencies = [ "quinn", "serde", "serde_json", - "thiserror 1.0.26 (git+https://github.com/Dessix/thiserror?rev=02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0)", + "thiserror 1.0.28 (git+https://github.com/Dessix/thiserror?rev=377de4811778b1e59cdfd242f8387dee10a3c1cb)", "tokio", "tokio-stream", "tokio-util", @@ -764,7 +764,7 @@ dependencies = [ "quinn", "rcgen", "snocat", - "thiserror 1.0.26 (git+https://github.com/Dessix/thiserror?rev=02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0)", + "thiserror 1.0.28 (git+https://github.com/Dessix/thiserror?rev=377de4811778b1e59cdfd242f8387dee10a3c1cb)", "tokio", "tokio-stream", "tokio-util", @@ -818,26 +818,26 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" +checksum = "283d5230e63df9608ac7d9691adc1dfb6e701225436eb64d0b9a7f0a5a04f6ec" dependencies = [ - "thiserror-impl 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror-impl 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thiserror" -version = "1.0.26" -source = "git+https://github.com/Dessix/thiserror?rev=02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0#02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0" +version = "1.0.28" +source = "git+https://github.com/Dessix/thiserror?rev=377de4811778b1e59cdfd242f8387dee10a3c1cb#377de4811778b1e59cdfd242f8387dee10a3c1cb" dependencies = [ - "thiserror-impl 1.0.26 (git+https://github.com/Dessix/thiserror?rev=02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0)", + "thiserror-impl 1.0.28 (git+https://github.com/Dessix/thiserror?rev=377de4811778b1e59cdfd242f8387dee10a3c1cb)", ] [[package]] name = "thiserror-impl" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" +checksum = "fa3884228611f5cd3608e2d409bf7dce832e4eb3135e3f11addbd7e41bd68e71" dependencies = [ "proc-macro2", "quote", @@ -846,8 +846,8 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.26" -source = "git+https://github.com/Dessix/thiserror?rev=02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0#02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0" +version = "1.0.28" +source = "git+https://github.com/Dessix/thiserror?rev=377de4811778b1e59cdfd242f8387dee10a3c1cb#377de4811778b1e59cdfd242f8387dee10a3c1cb" dependencies = [ "proc-macro2", "quote", diff --git a/NOTICE.md b/NOTICE.md index 52cbf9e..613c0d5 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -82,9 +82,9 @@ their own copyright notices and license terms: * [strsim v0.8.0](https://github.com/dguo/strsim-rs) - MIT * [syn v1.0.75](https://github.com/dtolnay/syn) - MIT OR Apache-2.0 * [textwrap v0.11.0](https://github.com/mgeisler/textwrap) - MIT -* [thiserror-impl v1.0.26](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 -* [thiserror-impl v1.0.26 (proc-macro) (https://github.com/Dessix/thiserror?rev=02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0#02012b03)](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 -* [thiserror v1.0.26](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror-impl v1.0.28](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror-impl v1.0.28 (proc-macro) (https://github.com/Dessix/thiserror?rev=377de4811778b1e59cdfd242f8387dee10a3c1cb#377de481)](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror v1.0.28](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 * [thread_local v1.1.3](https://github.com/Amanieu/thread_local-rs) - Apache-2.0/MIT * [tinyvec_macros v0.1.0](https://github.com/Soveu/tinyvec_macros) - MIT OR Apache-2.0 OR Zlib * [tinyvec v1.3.1](https://github.com/Lokathor/tinyvec) - Zlib OR Apache-2.0 OR MIT diff --git a/snocat-cli/Cargo.toml b/snocat-cli/Cargo.toml index 56d5499..b9fe931 100644 --- a/snocat-cli/Cargo.toml +++ b/snocat-cli/Cargo.toml @@ -20,7 +20,7 @@ gen-z = "~0.1.0" log = "~0.4.13" quinn = "~0.7.2" rcgen = "0.8" -thiserror = { version = "^1.0.26", git = "https://github.com/Dessix/thiserror", rev = "02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0" } +thiserror = { version = "^1.0.28", git = "https://github.com/Dessix/thiserror", rev = "377de4811778b1e59cdfd242f8387dee10a3c1cb" } tracing = "~0.1.22" tracing-futures = "~0.2.4" tracing-subscriber = "~0.2.20" diff --git a/snocat-cli/NOTICE.md b/snocat-cli/NOTICE.md index 5b8662d..86abc58 100644 --- a/snocat-cli/NOTICE.md +++ b/snocat-cli/NOTICE.md @@ -81,9 +81,9 @@ their own copyright notices and license terms: * [strsim v0.8.0](https://github.com/dguo/strsim-rs) - MIT * [syn v1.0.75](https://github.com/dtolnay/syn) - MIT OR Apache-2.0 * [textwrap v0.11.0](https://github.com/mgeisler/textwrap) - MIT -* [thiserror-impl v1.0.26](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 -* [thiserror-impl v1.0.26 (proc-macro) (https://github.com/Dessix/thiserror?rev=02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0#02012b03)](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 -* [thiserror v1.0.26](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror-impl v1.0.28](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror-impl v1.0.28 (proc-macro) (https://github.com/Dessix/thiserror?rev=377de4811778b1e59cdfd242f8387dee10a3c1cb#377de481)](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror v1.0.28](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 * [thread_local v1.1.3](https://github.com/Amanieu/thread_local-rs) - Apache-2.0/MIT * [tinyvec_macros v0.1.0](https://github.com/Soveu/tinyvec_macros) - MIT OR Apache-2.0 OR Zlib * [tinyvec v1.3.1](https://github.com/Lokathor/tinyvec) - Zlib OR Apache-2.0 OR MIT diff --git a/snocat/Cargo.toml b/snocat/Cargo.toml index 8aec449..01664bd 100644 --- a/snocat/Cargo.toml +++ b/snocat/Cargo.toml @@ -20,7 +20,7 @@ log = "~0.4.13" quinn = "~0.7.2" serde = { version = "~1.0.128", features=["derive"] } serde_json = "~1.0.66" -thiserror = { version = "^1.0.26", git = "https://github.com/Dessix/thiserror", rev = "02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0" } +thiserror = { version = "^1.0.28", git = "https://github.com/Dessix/thiserror", rev = "377de4811778b1e59cdfd242f8387dee10a3c1cb" } tracing = "~0.1.22" tracing-futures = "~0.2.4" tracing-subscriber = "~0.2.20" diff --git a/snocat/NOTICE.md b/snocat/NOTICE.md index 0863335..ea37032 100644 --- a/snocat/NOTICE.md +++ b/snocat/NOTICE.md @@ -73,9 +73,9 @@ their own copyright notices and license terms: * [socket2 v0.3.19](https://github.com/alexcrichton/socket2-rs) - MIT/Apache-2.0 * [spin v0.5.2](https://github.com/mvdnes/spin-rs.git) - MIT * [syn v1.0.75](https://github.com/dtolnay/syn) - MIT OR Apache-2.0 -* [thiserror-impl v1.0.26](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 -* [thiserror-impl v1.0.26 (proc-macro) (https://github.com/Dessix/thiserror?rev=02012b03f07bd7e06380fd2f13ea6a37ce4dfcc0#02012b03)](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 -* [thiserror v1.0.26](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror-impl v1.0.28](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror-impl v1.0.28 (proc-macro) (https://github.com/Dessix/thiserror?rev=377de4811778b1e59cdfd242f8387dee10a3c1cb#377de481)](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 +* [thiserror v1.0.28](https://github.com/dtolnay/thiserror) - MIT OR Apache-2.0 * [thread_local v1.1.3](https://github.com/Amanieu/thread_local-rs) - Apache-2.0/MIT * [tinyvec_macros v0.1.0](https://github.com/Soveu/tinyvec_macros) - MIT OR Apache-2.0 OR Zlib * [tinyvec v1.3.1](https://github.com/Lokathor/tinyvec) - Zlib OR Apache-2.0 OR MIT diff --git a/snocat/src/common/daemon/mod.rs b/snocat/src/common/daemon/mod.rs index 4605675..247643a 100644 --- a/snocat/src/common/daemon/mod.rs +++ b/snocat/src/common/daemon/mod.rs @@ -222,15 +222,12 @@ where } #[derive(thiserror::Error, Debug)] -enum TunnelLifecycleError< - ApplicationError: std::fmt::Debug + std::fmt::Display + 'static, - RegistryError: std::fmt::Debug + std::fmt::Display + 'static, -> { +enum TunnelLifecycleError { #[error("Tunnel registration error")] RegistrationError(#[from] TunnelRegistrationError), #[error("Tunnel naming error")] RegistryNamingError(#[from] TunnelNamingError), - #[error(transparent)] + #[error("{0}")] RequestProcessingError(RequestProcessingError), #[error("Authentication refused to remote by either breach of protocol or invalid/inadequate credentials")] AuthenticationRefused, @@ -239,7 +236,7 @@ enum TunnelLifecycleError< } #[derive(thiserror::Error, Debug)] -enum RequestProcessingError { +enum RequestProcessingError { #[error("Protocol version mismatch")] UnsupportedProtocolVersion, #[error("Tunnel error encountered: {0}")] diff --git a/snocat/src/common/protocol/negotiation.rs b/snocat/src/common/protocol/negotiation.rs index e6100b0..bc191a3 100644 --- a/snocat/src/common/protocol/negotiation.rs +++ b/snocat/src/common/protocol/negotiation.rs @@ -21,7 +21,6 @@ use super::{ pub const SNOCAT_NEGOTIATION_MAGIC: &[u8; 4] = &[0x4e, 0x59, 0x41, 0x4e]; // UTF-8 "NYAN" #[derive(thiserror::Error, Debug)] -#[error(bound = std::fmt::Debug)] pub enum NegotiationError { #[error("Stream read failed")] ReadError, diff --git a/snocat/src/common/protocol/service/mod.rs b/snocat/src/common/protocol/service/mod.rs index 162742a..13bc44b 100644 --- a/snocat/src/common/protocol/service/mod.rs +++ b/snocat/src/common/protocol/service/mod.rs @@ -15,7 +15,6 @@ use super::{negotiation::NegotiationError, RouteAddress}; // Client #[derive(thiserror::Error, Debug)] -#[error(bound = std::fmt::Debug)] pub enum ClientError { #[error("Invalid address provided to client")] InvalidAddress, @@ -396,7 +395,6 @@ impl<'client, TStream, TClient> Request<'client, TStream, TClient> { } #[derive(thiserror::Error, Debug)] -#[error(bound = std::fmt::Debug)] pub enum RoutingError { #[error("Route not found for request")] RouteNotFound(RouteAddress), @@ -406,7 +404,7 @@ pub enum RoutingError { InvalidAddress, #[error("The tunnel failed to provide a link")] LinkOpenFailure(#[from] super::tunnel::TunnelError), - #[error(transparent)] + #[error("{0}")] NegotiationError(NegotiationError), #[error("Routing error: {0:?}")] RouterError(RouterError), diff --git a/snocat/src/common/protocol/traits.rs b/snocat/src/common/protocol/traits.rs index f3e1cb1..ad8ef63 100644 --- a/snocat/src/common/protocol/traits.rs +++ b/snocat/src/common/protocol/traits.rs @@ -21,7 +21,6 @@ use super::{ use crate::common::protocol::tunnel::TunnelError; #[derive(thiserror::Error, Debug)] -#[error(bound = std::fmt::Debug)] pub enum ServiceError { #[error("Address refused by client")] Refused, diff --git a/snocat/src/common/protocol/tunnel/registry/mod.rs b/snocat/src/common/protocol/tunnel/registry/mod.rs index 7086702..aa9fb0e 100644 --- a/snocat/src/common/protocol/tunnel/registry/mod.rs +++ b/snocat/src/common/protocol/tunnel/registry/mod.rs @@ -71,7 +71,7 @@ impl Debug for TunnelRecord { } #[derive(thiserror::Error, Debug)] -pub enum TunnelRegistrationError { +pub enum TunnelRegistrationError { #[error("Tunnel ID was already occupied")] IdOccupied(TunnelId), #[error("Application error in tunnel registration")] @@ -87,7 +87,7 @@ impl From } #[derive(thiserror::Error, Debug)] -pub enum TunnelNamingError { +pub enum TunnelNamingError { #[error("The tunnel to be named was not found")] TunnelNotRegistered(TunnelId), #[error("Application error in tunnel naming")]