Skip to content

Commit c9431b2

Browse files
authored
refactor(rpc): remove dead got_notif flag from RpcService batch handler (#20171)
1 parent 8cbfd91 commit c9431b2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

crates/rpc/ipc/src/server/rpc_service.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,13 @@ impl RpcServiceT for RpcService {
107107

108108
fn batch<'a>(&self, req: Batch<'a>) -> impl Future<Output = Self::BatchResponse> + Send + 'a {
109109
let entries: Vec<_> = req.into_iter().collect();
110-
111-
let mut got_notif = false;
112110
let mut batch_response = BatchResponseBuilder::new_with_limit(self.max_response_body_size);
113111

114112
let mut pending_calls: FuturesOrdered<_> = entries
115113
.into_iter()
116114
.filter_map(|v| match v {
117115
Ok(BatchEntry::Call(call)) => Some(Either::Right(self.call(call))),
118-
Ok(BatchEntry::Notification(_n)) => {
119-
got_notif = true;
120-
None
121-
}
116+
Ok(BatchEntry::Notification(_n)) => None,
122117
Err(_err) => Some(Either::Left(async {
123118
MethodResponse::error(Id::Null, ErrorObject::from(ErrorCode::InvalidRequest))
124119
})),

0 commit comments

Comments
 (0)