From 0fe30ef2883f45d03e29f4ca14724302aa42c8f9 Mon Sep 17 00:00:00 2001 From: Maciej Gierada Date: Thu, 9 Nov 2023 22:23:02 +0100 Subject: [PATCH 1/2] feat: instead of Outcome:Failure us Outcome:Error --- src/implementations/access_token.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/implementations/access_token.rs b/src/implementations/access_token.rs index 0fe0bb3..ea156fd 100644 --- a/src/implementations/access_token.rs +++ b/src/implementations/access_token.rs @@ -16,7 +16,7 @@ impl<'r> FromRequest<'r> for Token { if auth_token == ACCESS_TOKEN.to_string() { Outcome::Success(Token(auth_token.to_string())) } else { - Outcome::Failure(( + Outcome::Error(( Status::Unauthorized, AuthError { error: "Invalid Authorization token".to_string(), @@ -24,7 +24,7 @@ impl<'r> FromRequest<'r> for Token { )) } } else { - Outcome::Failure(( + Outcome::Error(( Status::Unauthorized, AuthError { error: "Missing Authorization header".to_string(), From ce346434ebdcbce751e467ac86f66f77ff8434c2 Mon Sep 17 00:00:00 2001 From: Maciej Gierada Date: Thu, 9 Nov 2023 22:25:17 +0100 Subject: [PATCH 2/2] feat: ship as 0.12.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d51e1b6..96dab15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1233,7 +1233,7 @@ dependencies = [ [[package]] name = "rust_that_light" -version = "0.11.0" +version = "0.12.0" dependencies = [ "dotenv", "govee-api", diff --git a/Cargo.toml b/Cargo.toml index 4d62c24..eba6e55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rust_that_light" authors = ["Maciej Gierada @mgierada"] -version = "0.11.0" +version = "0.12.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html