Skip to content

Conversation

@yubiuser
Copy link
Contributor

@yubiuser yubiuser commented Oct 5, 2024

I was compiling librespot with the nightly toolchain an noticed this warning

#10 106.1    Compiling librespot-connect v0.5.0-dev (/librespot/connect)
#10 106.2 warning: elided lifetime has a name
#10 106.2     --> connect/src/spirc.rs:1537:73
#10 106.2      |
#10 106.2 1536 | impl<'a> CommandSender<'a> {
#10 106.2      |      -- lifetime `'a` declared here
#10 106.2 1537 |     fn new(spirc: &'a mut SpircTask, cmd: MessageType) -> CommandSender<'_> {
#10 106.2      |                                                                         ^^ this elided lifetime gets resolved as `'a`
#10 106.2      |
#10 106.2      = note: `#[warn(elided_named_lifetimes)]` on by default
#10 106.2 
#10 106.2 warning: elided lifetime has a name
#10 106.2     --> connect/src/spirc.rs:1552:65
#10 106.2      |
#10 106.2 1536 | impl<'a> CommandSender<'a> {
#10 106.2      |      -- lifetime `'a` declared here
#10 106.2 ...
#10 106.2 1552 |     fn recipient(mut self, recipient: &'a str) -> CommandSender<'_> {
#10 106.2      |                                                                 ^^ this elided lifetime gets resolved as `'a`
#10 106.2 

Background: rust-lang/rust#129207

This PR fixes the warning.

@roderickvd roderickvd merged commit 353c696 into librespot-org:dev Oct 6, 2024
13 checks passed
@yubiuser yubiuser deleted the fix/elided_lifetime branch October 6, 2024 20:13
paulfariello pushed a commit to paulfariello/librespot that referenced this pull request Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants