Skip to content

Commit

Permalink
fixup! fixup! fix: apply code review suggestions from #15
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsastrix committed Jul 2, 2024
1 parent b7bac5b commit 81f588b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcoap/src/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ pub enum CoapOption {
ETag(ETag),
MaxAge(MaxAge),
Observe(Observe),
Other(CoapOptionNum, Box<[u8]>),
Oscore(Oscore),
Echo(Echo),
RTag(RequestTag),
QBlock1(Block),
QBlock2(Block),
Other(CoapOptionNum, Box<[u8]>),
}

impl CoapOption {
Expand Down Expand Up @@ -205,12 +205,12 @@ impl CoapOption {
CoapOption::ETag(value) => value,
CoapOption::MaxAge(value) => encode_var_len_u32(value),
CoapOption::Observe(value) => encode_var_len_u32(value),
CoapOption::Other(_num, data) => data,
CoapOption::Oscore(value) => value,
CoapOption::Echo(value) => value,
CoapOption::RTag(value) => value,
CoapOption::QBlock1(value) => encode_var_len_u32(value),
CoapOption::QBlock2(value) => encode_var_len_u32(value),
CoapOption::Other(_num, data) => data,
};
if let Some(opt_type) = <CoapOptionType as FromPrimitive>::from_u16(num) {
if bytes.len() < opt_type.min_len() {
Expand Down

0 comments on commit 81f588b

Please sign in to comment.