Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

refactor(comm): change return of send to reflect the logic of delivery_group_size #2476

Merged
merged 1 commit into from
May 4, 2021

Conversation

Dylan-DPC-zz
Copy link
Contributor

@Dylan-DPC-zz Dylan-DPC-zz commented May 3, 2021

change return of send to reflect the logic of delivery_group_size delivery_group_size or not

BREAKING CHANGE: return type of Comm::send is now Result<SendStatus>

dirvine
dirvine previously approved these changes May 3, 2021
src/error.rs Outdated Show resolved Hide resolved
src/routing/comm.rs Outdated Show resolved Hide resolved
src/routing/comm.rs Outdated Show resolved Hide resolved
src/routing/comm.rs Outdated Show resolved Hide resolved
src/routing/comm.rs Outdated Show resolved Hide resolved
src/routing/comm.rs Outdated Show resolved Hide resolved
@@ -1108,7 +1108,7 @@ impl Core {
};
if recipients.is_empty() {
trace!("Cannot route user message, recipient list empty: {:?}", msg);
return Err(Error::CannotRoute);
return Err(Error::EmptyRecipientList);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think the previous CannotRoute error back is more accurate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt EmpyRecipientList gives a more clearer image of the error compared to CannotRoute

src/routing/dispatcher.rs Outdated Show resolved Hide resolved
@maqi maqi merged commit a1fa263 into maidsafe:master May 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants