Skip to content

Commit f2382dd

Browse files
committed
message: bubble up attribute writing errors to the caller.
1 parent 3fde949 commit f2382dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stun-types/src/message.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ impl<'a> MessageBuilder<'a> {
14981498
BigEndian::write_u16(&mut dest[2..4], (len - MessageHeader::LENGTH) as u16);
14991499
let mut offset = MessageHeader::LENGTH;
15001500
for attr in &self.attributes {
1501-
offset += attr.write_into(&mut dest[offset..]).unwrap();
1501+
offset += attr.write_into(&mut dest[offset..])?;
15021502
}
15031503
Ok(offset)
15041504
}

0 commit comments

Comments
 (0)