From 4b3726013e2ad64cbcdade44d87d04578dfaf7d9 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Thu, 9 Nov 2023 11:02:56 -0800 Subject: [PATCH 1/2] Use base64 0.21. --- lambda-runtime/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda-runtime/Cargo.toml b/lambda-runtime/Cargo.toml index d16eaedd..9fb8eb8b 100644 --- a/lambda-runtime/Cargo.toml +++ b/lambda-runtime/Cargo.toml @@ -43,5 +43,5 @@ tokio-stream = "0.1.2" lambda_runtime_api_client = { version = "0.8", path = "../lambda-runtime-api-client" } serde_path_to_error = "0.1.11" http-serde = "1.1.3" -base64 = "0.20.0" +base64 = "0.21.0" http-body = "0.4" From 90439f74fdc0273a3584b40a15547f7c0d1b3c5c Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Thu, 9 Nov 2023 14:01:16 -0800 Subject: [PATCH 2/2] Use a non-deprecated base64 encoding function. --- lambda-runtime/src/types.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lambda-runtime/src/types.rs b/lambda-runtime/src/types.rs index 27a4a9ae..2f0287ee 100644 --- a/lambda-runtime/src/types.rs +++ b/lambda-runtime/src/types.rs @@ -1,4 +1,5 @@ use crate::{Config, Error}; +use base64::prelude::*; use bytes::Bytes; use http::{HeaderMap, HeaderValue, StatusCode}; use serde::{Deserialize, Serialize}; @@ -208,7 +209,7 @@ impl ToStreamErrorTrailer for Error { fn to_tailer(&self) -> String { format!( "Lambda-Runtime-Function-Error-Type: Runtime.StreamError\r\nLambda-Runtime-Function-Error-Body: {}\r\n", - base64::encode(self.to_string()) + BASE64_STANDARD.encode(self.to_string()) ) } }