Skip to content

Commit f102711

Browse files
authored
Use base64 0.21. (#724)
* Use base64 0.21. * Use a non-deprecated base64 encoding function.
1 parent 8e6d77c commit f102711

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lambda-runtime/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ tokio-stream = "0.1.2"
4343
lambda_runtime_api_client = { version = "0.8", path = "../lambda-runtime-api-client" }
4444
serde_path_to_error = "0.1.11"
4545
http-serde = "1.1.3"
46-
base64 = "0.20.0"
46+
base64 = "0.21.0"
4747
http-body = "0.4"

lambda-runtime/src/types.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::{Config, Error};
2+
use base64::prelude::*;
23
use bytes::Bytes;
34
use http::{HeaderMap, HeaderValue, StatusCode};
45
use serde::{Deserialize, Serialize};
@@ -208,7 +209,7 @@ impl ToStreamErrorTrailer for Error {
208209
fn to_tailer(&self) -> String {
209210
format!(
210211
"Lambda-Runtime-Function-Error-Type: Runtime.StreamError\r\nLambda-Runtime-Function-Error-Body: {}\r\n",
211-
base64::encode(self.to_string())
212+
BASE64_STANDARD.encode(self.to_string())
212213
)
213214
}
214215
}

0 commit comments

Comments
 (0)