Skip to content

Commit d6bfb89

Browse files
roypatShadowCurse
authored andcommitted
chore: appease clippy
Signed-off-by: Patrick Roy <[email protected]>
1 parent fc4f26c commit d6bfb89

File tree

4 files changed

+19
-27
lines changed

4 files changed

+19
-27
lines changed

src/events.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ impl Events {
8282
///
8383
/// * source: object that wraps a file descriptor to be associated with `events`
8484
/// * events: events to monitor on the provided `source`;
85-
/// [`EventSet::ERROR`](struct.EventSet.html#associatedconstant.ERROR) and
86-
/// [`EventSet::HANG_UP`](struct.EventSet.html#associatedconstant.HANG_UP) are
87-
/// always monitored and don't need to be explicitly added to the list.
85+
/// [`EventSet::ERROR`](struct.EventSet.html#associatedconstant.ERROR) and
86+
/// [`EventSet::HANG_UP`](struct.EventSet.html#associatedconstant.HANG_UP) are
87+
/// always monitored and don't need to be explicitly added to the list.
8888
///
8989
/// # Example
9090
///
@@ -105,9 +105,9 @@ impl Events {
105105
///
106106
/// * source: file descriptor on which to monitor the `events`
107107
/// * events: events to monitor on the provided `source`;
108-
/// [`EventSet::ERROR`](struct.EventSet.html#associatedconstant.ERROR) and
109-
/// [`EventSet::HANG_UP`](struct.EventSet.html#associatedconstant.HANG_UP) are
110-
/// always monitored and don't need to be explicitly added to the list.
108+
/// [`EventSet::ERROR`](struct.EventSet.html#associatedconstant.ERROR) and
109+
/// [`EventSet::HANG_UP`](struct.EventSet.html#associatedconstant.HANG_UP) are
110+
/// always monitored and don't need to be explicitly added to the list.
111111
/// # Example
112112
///
113113
/// ```rust
@@ -128,11 +128,11 @@ impl Events {
128128
/// # Arguments
129129
/// * source: object that wraps a file descriptor to be associated with `events`
130130
/// * data: custom user data associated with the file descriptor; the data can be used for
131-
/// uniquely identify monitored events instead of using the file descriptor.
131+
/// uniquely identify monitored events instead of using the file descriptor.
132132
/// * events: events to monitor on the provided `source`;
133-
/// [`EventSet::ERROR`](struct.EventSet.html#associatedconstant.ERROR) and
134-
/// [`EventSet::HANG_UP`](struct.EventSet.html#associatedconstant.HANG_UP) are
135-
/// always monitored and don't need to be explicitly added to the list.
133+
/// [`EventSet::ERROR`](struct.EventSet.html#associatedconstant.ERROR) and
134+
/// [`EventSet::HANG_UP`](struct.EventSet.html#associatedconstant.HANG_UP) are
135+
/// always monitored and don't need to be explicitly added to the list.
136136
///
137137
/// # Examples
138138
///
@@ -153,11 +153,11 @@ impl Events {
153153
/// # Arguments
154154
/// * source: file descriptor to be associated with `events`
155155
/// * data: custom user data associated with the file descriptor; the data can be used for
156-
/// uniquely identify monitored events instead of using the file descriptor.
156+
/// uniquely identify monitored events instead of using the file descriptor.
157157
/// * events: events to monitor on the provided `source`;
158-
/// [`EventSet::ERROR`](struct.EventSet.html#associatedconstant.ERROR) and
159-
/// [`EventSet::HANG_UP`](struct.EventSet.html#associatedconstant.HANG_UP) are
160-
/// always monitored and don't need to be explicitly added to the list.
158+
/// [`EventSet::ERROR`](struct.EventSet.html#associatedconstant.ERROR) and
159+
/// [`EventSet::HANG_UP`](struct.EventSet.html#associatedconstant.HANG_UP) are
160+
/// always monitored and don't need to be explicitly added to the list.
161161
///
162162
/// # Examples
163163
///

src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,11 @@ impl std::fmt::Display for Error {
7272
#[cfg(feature = "remote_endpoint")]
7373
Error::EventFd(e) => write!(
7474
f,
75-
"event_manager: failed to manage EventFd file descriptor: {}",
76-
e
75+
"event_manager: failed to manage EventFd file descriptor: {e}"
7776
),
7877
Error::Epoll(e) => write!(
7978
f,
80-
"event_manager: failed to manage epoll file descriptor: {}",
81-
e
79+
"event_manager: failed to manage epoll file descriptor: {e}"
8280
),
8381
Error::FdAlreadyRegistered => write!(
8482
f,

src/manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ impl<S: MutEventSubscriber> EventManager<S> {
8989
/// # Arguments
9090
///
9191
/// * `ready_events_capacity`: maximum number of ready events to be
92-
/// processed a single `run`. The maximum value of this
93-
/// parameter is `EventManager::MAX_READY_EVENTS_CAPACITY`.
92+
/// processed a single `run`. The maximum value of this
93+
/// parameter is `EventManager::MAX_READY_EVENTS_CAPACITY`.
9494
pub fn new_with_capacity(ready_events_capacity: usize) -> Result<Self> {
9595
if ready_events_capacity > MAX_READY_EVENTS_CAPACITY {
9696
return Err(Error::InvalidCapacity);

src/utilities/subscribers.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl Default for Counter {
8282

8383
// A dummy subscriber that increments a counter whenever it processes
8484
// a new request.
85-
#[derive(Debug)]
85+
#[derive(Debug, Default)]
8686
pub struct CounterSubscriber(Counter);
8787

8888
impl std::ops::Deref for CounterSubscriber {
@@ -99,12 +99,6 @@ impl std::ops::DerefMut for CounterSubscriber {
9999
}
100100
}
101101

102-
impl Default for CounterSubscriber {
103-
fn default() -> Self {
104-
Self(Counter::new())
105-
}
106-
}
107-
108102
impl MutEventSubscriber for CounterSubscriber {
109103
fn process(&mut self, events: Events, event_ops: &mut EventOps) {
110104
match events.event_set() {

0 commit comments

Comments
 (0)