Chore: Cleanup clippy lints
This commit is contained in:
@@ -70,7 +70,7 @@ impl UdpRx {
|
|||||||
Err(flume::RecvError::Disconnected) => break,
|
Err(flume::RecvError::Disconnected) => break,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ = tokio::time::sleep_until(playout_time) => {
|
() = tokio::time::sleep_until(playout_time) => {
|
||||||
let mut tick = VoiceTick {
|
let mut tick = VoiceTick {
|
||||||
speaking: HashMap::new(),
|
speaking: HashMap::new(),
|
||||||
silent: HashSet::new(),
|
silent: HashSet::new(),
|
||||||
@@ -97,7 +97,7 @@ impl UdpRx {
|
|||||||
|
|
||||||
drop(interconnect.events.send(EventMessage::FireCoreEvent(CoreContext::VoiceTick(tick))));
|
drop(interconnect.events.send(EventMessage::FireCoreEvent(CoreContext::VoiceTick(tick))));
|
||||||
},
|
},
|
||||||
_ = tokio::time::sleep_until(cleanup_time) => {
|
() = tokio::time::sleep_until(cleanup_time) => {
|
||||||
// periodic cleanup.
|
// periodic cleanup.
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
|
|
||||||
|
|||||||
@@ -188,8 +188,6 @@ impl Songbird {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Creates an iterator for all [`Call`]s currently managed.
|
/// Creates an iterator for all [`Call`]s currently managed.
|
||||||
// TODO: Implement IntoIterator
|
|
||||||
#[allow(clippy::iter_without_into_iter)]
|
|
||||||
pub fn iter(&self) -> Iter<'_> {
|
pub fn iter(&self) -> Iter<'_> {
|
||||||
Iter {
|
Iter {
|
||||||
inner: self.calls.iter().map(|x| (*x.key(), Arc::clone(x.value()))),
|
inner: self.calls.iter().map(|x| (*x.key(), Arc::clone(x.value()))),
|
||||||
@@ -354,6 +352,16 @@ impl Songbird {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> IntoIterator for &'a Songbird {
|
||||||
|
type Item = <Iter<'a> as Iterator>::Item;
|
||||||
|
|
||||||
|
type IntoIter = Iter<'a>;
|
||||||
|
|
||||||
|
fn into_iter(self) -> Self::IntoIter {
|
||||||
|
self.iter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "twilight")]
|
#[cfg(feature = "twilight")]
|
||||||
impl Songbird {
|
impl Songbird {
|
||||||
/// Handle events received on the cluster.
|
/// Handle events received on the cluster.
|
||||||
|
|||||||
Reference in New Issue
Block a user