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