Skip to content

Commit 2d4758a

Browse files
andreeaflorescualexandruag
authored andcommitted
derive Debug for fam & eventfd
The fam debug implementation is rather dummy, but it still helps with debugging by allowing the derive on structures containing a fam struct. Signed-off-by: Andreea Florescu <[email protected]>
1 parent 341da55 commit 2d4758a

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

coverage_config_x86_64.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"coverage_score": 87.6,
2+
"coverage_score": 87.4,
33
"exclude_path": "",
44
"crate_features": ""
55
}

src/fam.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ pub unsafe trait FamStruct {
142142
/// A wrapper for [`FamStruct`](trait.FamStruct.html).
143143
///
144144
/// It helps in treating a [`FamStruct`](trait.FamStruct.html) similarly to an actual `Vec`.
145+
#[derive(Debug)]
145146
pub struct FamStructWrapper<T: Default + FamStruct> {
146147
// This variable holds the FamStruct structure. We use a `Vec<T>` to make the allocation
147148
// large enough while still being aligned for `T`. Only the first element of `Vec<T>`

src/linux/eventfd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub use libc::{EFD_CLOEXEC, EFD_NONBLOCK, EFD_SEMAPHORE};
1818

1919
/// A safe wrapper around Linux
2020
/// [`eventfd`](http://man7.org/linux/man-pages/man2/eventfd.2.html).
21+
#[derive(Debug)]
2122
pub struct EventFd {
2223
eventfd: File,
2324
}

0 commit comments

Comments
 (0)