diff --git a/Cargo.toml b/Cargo.toml index 265c506..e3f9df8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ggemini" -version = "0.1.1" +version = "0.1.2" edition = "2021" license = "MIT" readme = "README.md" diff --git a/src/client/response/header.rs b/src/client/response/header.rs index f0af429..ef3da60 100644 --- a/src/client/response/header.rs +++ b/src/client/response/header.rs @@ -9,7 +9,7 @@ pub use mime::Mime; pub use status::Status; pub struct Header { - status: Status, + status: Option, meta: Option, mime: Option, // @TODO @@ -38,15 +38,15 @@ impl Header { // let language = language::from_header(buffer); @TODO let status = match status::from_header(buffer) { - Ok(result) => result, - Err(_) => return Err(Error::Status), + Ok(result) => Some(result), + Err(_) => None, }; Ok(Self { status, meta, mime }) } // Getters - pub fn status(&self) -> &Status { + pub fn status(&self) -> &Option { &self.status }