[PR #1365] [MERGED] Fix elided_named_lifetimes #1362

Closed
opened 2026-02-27 20:02:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/1365
Author: @yubiuser
Created: 10/5/2024
Status: Merged
Merged: 10/6/2024
Merged by: @roderickvd

Base: devHead: fix/elided_lifetime


📝 Commits (2)

  • fd29404 Fix elided_named_lifetimes
  • a20aeac Change return type annotations to Self

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 connect/src/spirc.rs (+3 -3)

📄 Description

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: https://github.com/rust-lang/rust/pull/129207

This PR fixes the warning.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/1365 **Author:** [@yubiuser](https://github.com/yubiuser) **Created:** 10/5/2024 **Status:** ✅ Merged **Merged:** 10/6/2024 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `fix/elided_lifetime` --- ### 📝 Commits (2) - [`fd29404`](https://github.com/librespot-org/librespot/commit/fd2940491d9b69dc3265d2e78aeb2b9d3e6a40b9) Fix elided_named_lifetimes - [`a20aeac`](https://github.com/librespot-org/librespot/commit/a20aeace0dca2570f4ff16e82deb75300296a4f2) Change return type annotations to Self ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `connect/src/spirc.rs` (+3 -3) </details> ### 📄 Description 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: https://github.com/rust-lang/rust/pull/129207 This PR fixes the warning. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:02:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1362
No description provided.