@@ -8,6 +8,7 @@ use std::task::Poll;
88use byteorder:: { BigEndian , ByteOrder } ;
99use bytes:: Bytes ;
1010use futures_util:: FutureExt ;
11+ use protobuf:: Message ;
1112use tokio:: sync:: { mpsc, oneshot} ;
1213
1314use crate :: protocol;
@@ -123,8 +124,8 @@ impl MercuryManager {
123124 if !response. payload . is_empty ( ) {
124125 // Old subscription protocol, watch the provided list of URIs
125126 for sub in response. payload {
126- let mut sub: protocol :: pubsub :: Subscription =
127- protobuf :: parse_from_bytes ( & sub) . unwrap ( ) ;
127+ let mut sub =
128+ protocol :: pubsub :: Subscription :: parse_from_bytes ( & sub) . unwrap ( ) ;
128129 let sub_uri = sub. take_uri ( ) ;
129130
130131 debug ! ( "subscribed sub_uri={}" , sub_uri) ;
@@ -192,7 +193,7 @@ impl MercuryManager {
192193
193194 fn complete_request ( & self , cmd : u8 , mut pending : MercuryPending ) {
194195 let header_data = pending. parts . remove ( 0 ) ;
195- let header: protocol:: mercury:: Header = protobuf :: parse_from_bytes ( & header_data) . unwrap ( ) ;
196+ let header = protocol:: mercury:: Header :: parse_from_bytes ( & header_data) . unwrap ( ) ;
196197
197198 let response = MercuryResponse {
198199 uri : header. get_uri ( ) . to_string ( ) ,
0 commit comments