aya-log: simplify EbpfLogger as_raw_fd implementation

Replace struct pattern matching with direct field access in the as_raw_fd method,
making the code more concise and cleaner.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
reviewable/pr1297/r1
Xiaobo Liu 1 week ago
parent 727dfcd7ee
commit ec4e87a935

@ -100,11 +100,7 @@ pub struct EbpfLogger<T> {
impl<T> AsRawFd for EbpfLogger<T> {
fn as_raw_fd(&self) -> std::os::unix::prelude::RawFd {
let Self {
ring_buf,
logger: _,
} = self;
ring_buf.as_raw_fd()
self.ring_buf.as_raw_fd()
}
}

Loading…
Cancel
Save