From 6efe51bb155eb8ea4e3df7af31f27f7dbde9e07f Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Thu, 1 Aug 2024 10:32:55 +0400 Subject: [PATCH] feat: add impl Debug --- src/error.rs | 2 ++ src/response.rs | 1 + src/status.rs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index d76e55d..7dcf304 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,3 +1,4 @@ +#[derive(Debug)] pub enum LibError { IoError(std::io::Error), InvalidUrlError(InvalidUrl), @@ -48,6 +49,7 @@ impl From for LibError { } } +#[derive(Debug)] pub enum InvalidUrl { ParseError(url::ParseError), SchemeNotGemini, diff --git a/src/response.rs b/src/response.rs index ad7bc93..696bb7b 100644 --- a/src/response.rs +++ b/src/response.rs @@ -2,6 +2,7 @@ use crate::{status::Status, LibError}; type BodyStream = tokio_rustls::client::TlsStream; +#[derive(Debug)] pub struct Response { status: Status, message: String, diff --git a/src/status.rs b/src/status.rs index 3487af9..42effe5 100644 --- a/src/status.rs +++ b/src/status.rs @@ -2,7 +2,7 @@ use crate::error::LibError; use num_enum::{IntoPrimitive, TryFromPrimitive}; -#[derive(Clone, Copy)] +#[derive(Debug, Clone, Copy)] pub struct Status { status_code: StatusCode, reply_type: ReplyType,