Skip to content

Revert "Mark all public struct/enum as non_exhaustive" #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ pub const NETLINK_HEADER_LEN: usize = PAYLOAD.start;
/// Note that in this second example we don't call
/// [`new_checked()`](struct.NetlinkBuffer.html#method.new_checked) because the length field is
/// initialized to 0, so `new_checked()` would return an error.
#[non_exhaustive]
pub struct NetlinkBuffer<T> {
pub buffer: T,
}
Expand Down
2 changes: 0 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const PAYLOAD: Rest = 4..;
const ERROR_HEADER_LEN: usize = PAYLOAD.start;

#[derive(Debug, PartialEq, Eq, Clone)]
#[non_exhaustive]
pub struct ErrorBuffer<T> {
buffer: T,
}
Expand Down Expand Up @@ -88,7 +87,6 @@ impl<T: AsRef<[u8]> + AsMut<[u8]>> ErrorBuffer<T> {
///
/// [RFC 3549 section 2.3.2.2]: https://datatracker.ietf.org/doc/html/rfc3549#section-2.3.2.2
#[derive(Debug, Default, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub struct ErrorMessage {
/// The error code.
///
Expand Down
1 change: 0 additions & 1 deletion src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use crate::{buffer::NETLINK_HEADER_LEN, Emitable, NetlinkBuffer, Parseable};
/// +----------------+----------------+----------------+----------------+
/// ```
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Default)]
#[non_exhaustive]
pub struct NetlinkHeader {
/// Length of the netlink packet, including the header and the payload
pub length: u32,
Expand Down
1 change: 0 additions & 1 deletion src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use crate::{

/// Represent a netlink message.
#[derive(Debug, PartialEq, Eq, Clone)]
#[non_exhaustive]
pub struct NetlinkMessage<I> {
/// Message header (this is common to all the netlink protocols)
pub header: NetlinkHeader,
Expand Down
1 change: 0 additions & 1 deletion src/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pub const NLMSG_OVERRUN: u16 = 4;
pub const NLMSG_ALIGNTO: u16 = 4;

#[derive(Debug, PartialEq, Eq, Clone)]
#[non_exhaustive]
pub enum NetlinkPayload<I> {
Done(DoneMessage),
Error(ErrorMessage),
Expand Down