Skip to content

Commit

Permalink
Remove unreachable macro from reachable code
Browse files Browse the repository at this point in the history
Signed-off-by: Thales Fragoso <[email protected]>
  • Loading branch information
thalesfragoso committed Oct 8, 2024
1 parent 8cd54ba commit c0714e7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/usp_builder/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl MsgBuilder {
get_supported_protocol(_) => GET_SUPPORTED_PROTO,
register(_) => REGISTER,
deregister(_) => DEREGISTER,
OneOfreq_type::None => unreachable!(),
OneOfreq_type::None => ERROR,
},
response(ref resp) => match &resp.resp_type {
get_resp(_) => GET_RESP,
Expand All @@ -86,10 +86,9 @@ impl MsgBuilder {
get_supported_protocol_resp(_) => GET_SUPPORTED_PROTO_RESP,
register_resp(_) => REGISTER_RESP,
deregister_resp(_) => DEREGISTER_RESP,
OneOfresp_type::None => unreachable!(),
OneOfresp_type::None => ERROR,
},
error(_) => ERROR,
OneOfmsg_body::None => unreachable!(),
error(_) | OneOfmsg_body::None => ERROR,
};

Ok(Msg {
Expand Down

0 comments on commit c0714e7

Please sign in to comment.