File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " cloud-pubsub"
3- version = " 0.8 .0"
3+ version = " 0.9 .0"
44authors = [" Kayle Gishen <k@bkdsw.com>" , " tehAnswer <sergiorodriguezgijon@gmail.com>" ]
55edition = " 2018"
66description = " Google Cloud PubSub Client"
@@ -15,12 +15,12 @@ bytes = "1"
1515hyper = " 0.14"
1616hyper-tls = " 0.5"
1717tokio = " 1"
18- goauth = " 0.9 "
19- smpl_jwt = " 0.6 "
18+ goauth = " 0.13 "
19+ smpl_jwt = " 0.7 "
2020serde = " 1.0"
2121serde_derive = " 1.0"
2222serde_json = " 1.0"
23- base64 = " 0.13 "
23+ base64 = " 0.21 "
2424lazy_static = " 1.4.0"
2525rand = " 0.8"
2626log = " 0.4"
Original file line number Diff line number Diff line change 11use crate :: error;
2- use base64;
2+ use base64:: { self , Engine } ;
33use serde_derive:: { Deserialize , Serialize } ;
44use std:: collections:: HashMap ;
55
1919
2020impl 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}
You can’t perform that action at this time.
0 commit comments