Implement Clone for ManualEventReader (#12777)
# Objective Fix #12764. ## Solution Implement Clone for the type.
This commit is contained in:
parent
e62a01f403
commit
476e296561
@ -614,6 +614,15 @@ impl<E: Event> Default for ManualEventReader<E> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<E: Event> Clone for ManualEventReader<E> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
ManualEventReader {
|
||||||
|
last_event_count: self.last_event_count,
|
||||||
|
_marker: PhantomData,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(clippy::len_without_is_empty)] // Check fails since the is_empty implementation has a signature other than `(&self) -> bool`
|
#[allow(clippy::len_without_is_empty)] // Check fails since the is_empty implementation has a signature other than `(&self) -> bool`
|
||||||
impl<E: Event> ManualEventReader<E> {
|
impl<E: Event> ManualEventReader<E> {
|
||||||
/// See [`EventReader::read`]
|
/// See [`EventReader::read`]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user