Skip to content

Commit

Permalink
apply review suggestion from @mfranciszkiewicz
Browse files Browse the repository at this point in the history
  • Loading branch information
tworec committed Nov 9, 2020
1 parent 69deb4d commit 8e4e5e4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions service-bus/router/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,10 @@ where
}
} else {
match self.registered_endpoints.entry(msg.service_id.clone()) {
Entry::Occupied(_) => {
log::warn!("Service '{}' already registered", msg.service_id);
RegisterReply {
code: RegisterReplyCode::RegisterConflict as i32,
message: format!("Service ID '{}' already registered", msg.service_id),
}
}
Entry::Occupied(_) => RegisterReply {
code: RegisterReplyCode::RegisterConflict as i32,
message: format!("Service ID '{}' already registered", msg.service_id),
},
Entry::Vacant(entry) => {
entry.insert(addr.clone());
self.reversed_endpoints
Expand Down

0 comments on commit 8e4e5e4

Please sign in to comment.