aboutsummaryrefslogtreecommitdiff
path: root/src/context/error.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-06 07:25:24 +0000
committerFuwn <[email protected]>2023-04-06 07:25:24 +0000
commit4444f64ee98f314938a383b4dfdf3cd74fd7e717 (patch)
tree3c4f36a742112e0a0cde337aaa0ffe3fd7096a99 /src/context/error.rs
parentfeat(cargo): bump 0.3.0 -> 0.3.1 (diff)
downloadwindmark-4444f64ee98f314938a383b4dfdf3cd74fd7e717.tar.xz
windmark-4444f64ee98f314938a383b4dfdf3cd74fd7e717.zip
fix(context): fix async sharing
Diffstat (limited to 'src/context/error.rs')
-rw-r--r--src/context/error.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/context/error.rs b/src/context/error.rs
index eb1e00e..a9a4b85 100644
--- a/src/context/error.rs
+++ b/src/context/error.rs
@@ -17,24 +17,18 @@
// SPDX-License-Identifier: GPL-3.0-only
use openssl::x509::X509;
-use tokio::net::TcpStream;
use url::Url;
#[allow(clippy::module_name_repetitions)]
-pub struct ErrorContext<'a> {
- pub tcp: &'a TcpStream,
- pub url: &'a Url,
- pub certificate: &'a Option<X509>,
+pub struct ErrorContext {
+ pub url: Url,
+ pub certificate: Option<X509>,
}
-impl<'a> ErrorContext<'a> {
- pub const fn new(
- tcp: &'a TcpStream,
- url: &'a Url,
- certificate: &'a Option<X509>,
- ) -> Self {
+impl ErrorContext {
+ #[must_use]
+ pub const fn new(url: Url, certificate: Option<X509>) -> Self {
Self {
- tcp,
url,
certificate,
}