Skip to content

Commit 624877b

Browse files
committed
chore: update dependencies
1 parent ca27e25 commit 624877b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cloud-pubsub"
3-
version = "0.8.0"
3+
version = "0.9.0"
44
authors = ["Kayle Gishen <k@bkdsw.com>", "tehAnswer <sergiorodriguezgijon@gmail.com>"]
55
edition = "2018"
66
description = "Google Cloud PubSub Client"
@@ -15,12 +15,12 @@ bytes = "1"
1515
hyper = "0.14"
1616
hyper-tls = "0.5"
1717
tokio = "1"
18-
goauth = "0.9"
19-
smpl_jwt = "0.6"
18+
goauth = "0.13"
19+
smpl_jwt = "0.7"
2020
serde = "1.0"
2121
serde_derive = "1.0"
2222
serde_json = "1.0"
23-
base64 = "0.13"
23+
base64 = "0.21"
2424
lazy_static = "1.4.0"
2525
rand = "0.8"
2626
log = "0.4"

src/message.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::error;
2-
use base64;
2+
use base64::{self, Engine};
33
use serde_derive::{Deserialize, Serialize};
44
use std::collections::HashMap;
55

@@ -19,7 +19,7 @@ where
1919

2020
impl EncodedMessage {
2121
pub fn decode(&self) -> Result<Vec<u8>, base64::DecodeError> {
22-
base64::decode(&self.data)
22+
base64::engine::general_purpose::STANDARD.decode(&self.data)
2323
}
2424

2525
pub fn attributes(&self) -> Option<&HashMap<String, String>> {
@@ -31,11 +31,11 @@ impl EncodedMessage {
3131
Self::new_binary(&json, attributes)
3232
}
3333

34-
pub fn new_binary<T: AsRef<[u8]>>(
34+
pub fn new_binary<T: AsRef<[u8]> + std::marker::Sync>(
3535
incoming: &T,
3636
attributes: Option<HashMap<String, String>>,
3737
) -> Self {
38-
let data = base64::encode(&incoming);
38+
let data = base64::engine::general_purpose::STANDARD.encode(&incoming);
3939
EncodedMessage { data, attributes }
4040
}
4141
}

0 commit comments

Comments
 (0)