Skip to content

Commit 32f2dbe

Browse files
nits
1 parent 99c1891 commit 32f2dbe

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

actor/src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ commonware_macros::stability_scope!(BETA {
3131
/// Feedback from endpoints that may reject work under backpressure.
3232
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
3333
pub enum Unreliable<T> {
34-
/// Feedback returned by the endpoint.
34+
/// Normal endpoint feedback from the submission attempt.
3535
Feedback(T),
3636
/// The work was rejected by the endpoint.
3737
Rejected,
@@ -57,11 +57,5 @@ commonware_macros::stability_scope!(BETA {
5757
}
5858
}
5959

60-
impl From<Feedback> for Unreliable<Feedback> {
61-
fn from(feedback: Feedback) -> Self {
62-
Self::new(feedback)
63-
}
64-
}
65-
6660
pub mod mailbox;
6761
});

actor/src/mailbox.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ pub trait UnreliablePolicy: Sized {
122122
/// the message, coalescing it with retained work, replacing older retained work, or deliberately
123123
/// doing no work because the message is already satisfied, superseded, or no longer needed.
124124
///
125-
/// Returns `false` only when the policy rejects the message under backpressure. This is the
126-
/// unreliable case: the submitted work was not semantically handled, and callers that care
127-
/// should retry or treat the submission as failed.
125+
/// Returns `false` only when the policy rejects the message under backpressure without
126+
/// retaining, coalescing, replacing, or otherwise handling it. This is the unreliable case: the
127+
/// submitted work was not semantically handled, and callers that care should retry or treat the
128+
/// submission as failed.
128129
///
129130
/// # Warning
130131
///

p2p/src/authenticated/discovery/actors/spawner/ingress.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ impl<P: PublicKey, O: Sink, I: Stream> UnreliablePolicy for Message<O, I, P> {
3232
impl<P: PublicKey, O: Sink, I: Stream> Mailbox<Message<O, I, P>> {
3333
/// Send a message to the actor to spawn a new task for the given peer.
3434
///
35-
/// This may reject when the spawner is backlogged or closed, which is harmless since stale
36-
/// connections do not need to be spawned.
35+
/// This may be rejected when the spawner is backlogged, or return closed after shutdown, which
36+
/// is harmless since stale connections do not need to be spawned.
3737
pub fn spawn(
3838
&mut self,
3939
connection: (Sender<O>, Receiver<I>),

p2p/src/authenticated/lookup/actors/spawner/ingress.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ impl<Si: Sink, St: Stream, P: PublicKey> UnreliablePolicy for Message<Si, St, P>
3232
impl<Si: Sink, St: Stream, P: PublicKey> Mailbox<Message<Si, St, P>> {
3333
/// Send a message to the actor to spawn a new task for the given peer.
3434
///
35-
/// This may reject when the spawner is backlogged or closed, which is harmless since stale
36-
/// connections do not need to be spawned.
35+
/// This may be rejected when the spawner is backlogged, or return closed after shutdown, which
36+
/// is harmless since stale connections do not need to be spawned.
3737
pub fn spawn(
3838
&mut self,
3939
connection: (Sender<Si>, Receiver<St>),

0 commit comments

Comments
 (0)