Skip to content

Commit 3514766

Browse files
ghananiganscathay4t
authored andcommitted
Derive Default for ErrorMessage
Downstream consumers may have a need to construct an `ErrorMessage`. Currently, Fuchsia's netlink implementation works around this by manually constructing the buffer for an `ErrorMessage` then parsing the buffer[1]. [1]: https://cs.opensource.google/fuchsia/fuchsia/+/main:src/connectivity/network/netlink/src/netlink_packet.rs;l=26;drc=f6e8db007e3fcc51d581f7876a30f1cb4149009f
1 parent 4de9f72 commit 3514766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<T: AsRef<[u8]> + AsMut<[u8]>> ErrorBuffer<T> {
7777
}
7878
}
7979

80-
#[derive(Debug, Clone, PartialEq, Eq)]
80+
#[derive(Debug, Default, Clone, PartialEq, Eq)]
8181
#[non_exhaustive]
8282
pub struct ErrorMessage {
8383
pub code: i32,

0 commit comments

Comments
 (0)