Skip to content

Commit b8b8cdb

Browse files
committed
[glue] align Policy::handle signatures with trait
1 parent afb01ef commit b8b8cdb

5 files changed

Lines changed: 10 additions & 15 deletions

File tree

glue/src/stateful/actor/mailbox.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ where
113113
{
114114
type Overflow = Pending<E, A>;
115115

116-
fn handle(overflow: &mut Self::Overflow, message: Self) -> bool {
116+
fn handle(overflow: &mut Self::Overflow, message: Self) {
117117
if message.response_closed() {
118-
return true;
118+
return;
119119
}
120120
overflow.0.push_back(message);
121-
true
122121
}
123122
}
124123

glue/src/stateful/db/compact_p2p/handler.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,11 @@ impl<F: Family, D: Digest> Overflow<EngineMessage<F, D>> for EnginePending<F, D>
160160
impl<F: Family, D: Digest> Policy for EngineMessage<F, D> {
161161
type Overflow = EnginePending<F, D>;
162162

163-
fn handle(overflow: &mut Self::Overflow, message: Self) -> bool {
163+
fn handle(overflow: &mut Self::Overflow, message: Self) {
164164
if message.response_closed() {
165-
return true;
165+
return;
166166
}
167167
overflow.0.push_back(message);
168-
true
169168
}
170169
}
171170

glue/src/stateful/db/compact_p2p/mailbox.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ impl<DB, F: Family, Op, D: Digest> Overflow<Message<DB, F, Op, D>> for Pending<D
7777
impl<DB, F: Family, Op, D: Digest> Policy for Message<DB, F, Op, D> {
7878
type Overflow = Pending<DB, F, Op, D>;
7979

80-
fn handle(overflow: &mut Self::Overflow, message: Self) -> bool {
80+
fn handle(overflow: &mut Self::Overflow, message: Self) {
8181
if message.response_closed() {
82-
return true;
82+
return;
8383
}
8484

8585
match message {
@@ -88,7 +88,6 @@ impl<DB, F: Family, Op, D: Digest> Policy for Message<DB, F, Op, D> {
8888
}
8989
message => overflow.messages.push_back(message),
9090
}
91-
true
9291
}
9392
}
9493

glue/src/stateful/db/p2p/handler.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,11 @@ impl<F: Family> Overflow<EngineMessage<F>> for EnginePending<F> {
248248
impl<F: Family> Policy for EngineMessage<F> {
249249
type Overflow = EnginePending<F>;
250250

251-
fn handle(overflow: &mut Self::Overflow, message: Self) -> bool {
251+
fn handle(overflow: &mut Self::Overflow, message: Self) {
252252
if message.response_closed() {
253-
return true;
253+
return;
254254
}
255255
overflow.0.push_back(message);
256-
true
257256
}
258257
}
259258

glue/src/stateful/db/p2p/mailbox.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ impl<DB, F: Family, Op, D: Digest> Overflow<Message<DB, F, Op, D>> for Pending<D
8888
impl<DB, F: Family, Op, D: Digest> Policy for Message<DB, F, Op, D> {
8989
type Overflow = Pending<DB, F, Op, D>;
9090

91-
fn handle(overflow: &mut Self::Overflow, message: Self) -> bool {
91+
fn handle(overflow: &mut Self::Overflow, message: Self) {
9292
if message.response_closed() {
93-
return true;
93+
return;
9494
}
9595

9696
match message {
@@ -99,7 +99,6 @@ impl<DB, F: Family, Op, D: Digest> Policy for Message<DB, F, Op, D> {
9999
}
100100
message => overflow.messages.push_back(message),
101101
}
102-
true
103102
}
104103
}
105104

0 commit comments

Comments
 (0)