Skip to content

Commit

Permalink
fix(network): remove TryFrom for response from server payload
Browse files Browse the repository at this point in the history
  • Loading branch information
eitanm-starkware committed Jul 22, 2024
1 parent e23be56 commit d05b07a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/papyrus_network/src/network_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,10 @@ pub struct SqmrClientPayload<Query, Response: TryFrom<Bytes>> {

pub type SqmrClientSender<Query, Response> = GenericSender<SqmrClientPayload<Query, Response>>;

pub struct SqmrServerPayload<Query, Response: TryFrom<Bytes>> {
pub query: Query,
pub struct SqmrServerPayload<Query: TryFrom<Bytes>, Response> {
pub query: Result<Query, <Query as TryFrom<Bytes>>::Error>,
pub report_sender: ReportSender,
pub responses_sender: ResponsesSender<Response>,
pub responses_sender: GenericSender<Response>,
}

// TODO(shahak): Return this type in register_sqmr_protocol_server
Expand Down Expand Up @@ -681,7 +681,7 @@ where
}
}

impl<Query, Response: TryFrom<Bytes>> From<SqmrServerPayloadForNetwork>
impl<Query: TryFrom<Bytes>, Response: TryFrom<Bytes>> From<SqmrServerPayloadForNetwork>
for SqmrServerPayload<Query, Response>
{
fn from(_payload: SqmrServerPayloadForNetwork) -> Self {
Expand Down

0 comments on commit d05b07a

Please sign in to comment.