|
4 | 4 | use {Error, Result};
|
5 | 5 | use errno::Errno;
|
6 | 6 | use libc::{timespec, time_t, c_int, c_long, uintptr_t};
|
7 |
| -use std::fmt; |
8 | 7 | use std::os::unix::io::RawFd;
|
9 | 8 |
|
10 | 9 | pub use self::ffi::kevent as KEvent;
|
@@ -75,40 +74,6 @@ bitflags!(
|
75 | 74 | }
|
76 | 75 | );
|
77 | 76 |
|
78 |
| -impl fmt::Debug for EventFlag { |
79 |
| - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { |
80 |
| - let mut one = false; |
81 |
| - let flags = [ |
82 |
| - (EV_ADD, "EV_ADD"), |
83 |
| - (EV_DELETE, "EV_DELETE"), |
84 |
| - (EV_ENABLE, "EV_ENABLE"), |
85 |
| - (EV_DISABLE, "EV_DISABLE"), |
86 |
| - (EV_RECEIPT, "EV_RECEIPT"), |
87 |
| - (EV_ONESHOT, "EV_ONESHOT"), |
88 |
| - (EV_CLEAR, "EV_CLEAR"), |
89 |
| - (EV_DISPATCH, "EV_DISPATCH"), |
90 |
| - (EV_SYSFLAGS, "EV_SYSFLAGS"), |
91 |
| - (EV_FLAG0, "EV_FLAG0"), |
92 |
| - (EV_FLAG1, "EV_FLAG1"), |
93 |
| - (EV_EOF, "EV_EOF")]; |
94 |
| - |
95 |
| - for &(flag, msg) in flags.iter() { |
96 |
| - if self.contains(flag) { |
97 |
| - if one { try!(write!(fmt, " | ")) } |
98 |
| - try!(write!(fmt, "{}", msg)); |
99 |
| - |
100 |
| - one = true |
101 |
| - } |
102 |
| - } |
103 |
| - |
104 |
| - if !one { |
105 |
| - try!(write!(fmt, "<None>")); |
106 |
| - } |
107 |
| - |
108 |
| - Ok(()) |
109 |
| - } |
110 |
| -} |
111 |
| - |
112 | 77 | bitflags!(
|
113 | 78 | flags FilterFlag: u32 {
|
114 | 79 | const NOTE_TRIGGER = 0x01000000,
|
|
0 commit comments