fix(mpris2): regression in 2024 edition migration

Rust 2024 edition changed the lifetime capture rules, which broke
`Enumerator::receive_changes()`. Adding the `use<>` bound makes sure
that the lifetime isn't captured, like it was in the 2021 edition.

fixes: c31a46961a
This commit is contained in:
Cheong Lau 2025-10-12 12:53:14 +10:00 committed by Michael Murphy
parent 37cbe4e8c1
commit b2337437d7

View file

@ -33,7 +33,7 @@ impl Enumerator {
/// Returns a stream that is signalled when an mpris client is added or removed
pub async fn receive_changes(
&self,
) -> zbus::Result<impl Stream<Item = zbus::Result<Event>> + Unpin> {
) -> zbus::Result<impl Stream<Item = zbus::Result<Event>> + Unpin + use<>> {
let stream = self.proxy.receive_name_owner_changed().await?;
Ok(stream
.filter_map(|signal| {