[PR #1655] [MERGED] Remove redundant closures #1478

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

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/1655
Author: @xtqqczze
Created: 11/30/2025
Status: Merged
Merged: 12/24/2025
Merged by: @photovoltex

Base: devHead: clippy/redundant_closure_for_method_calls


📝 Commits (7)

  • 98c5da4 fix: clippy::redundant_closure_for_method_calls
  • 46a5606 fixup! fix: clippy::redundant_closure_for_method_calls
  • 987def6 use Into::into
  • 530aba8 use Instant::elapsed
  • d2c4ba5 cargo fmt
  • 3bb6618 enable clippy lint
  • 16696a6 add lints to all packages

📊 Changes

22 files changed (+52 additions, -24 deletions)

View changed files

📝 Cargo.toml (+6 -0)
📝 audio/Cargo.toml (+3 -0)
📝 audio/src/fetch/receive.rs (+5 -1)
📝 connect/Cargo.toml (+3 -0)
📝 connect/src/context_resolver.rs (+1 -1)
📝 core/Cargo.toml (+3 -0)
📝 core/src/http_client.rs (+1 -4)
📝 core/src/spclient.rs (+3 -3)
📝 discovery/Cargo.toml (+3 -0)
📝 metadata/Cargo.toml (+3 -0)
📝 metadata/src/image.rs (+1 -1)
📝 metadata/src/lyrics.rs (+1 -1)
📝 metadata/src/playlist/attribute.rs (+2 -2)
📝 metadata/src/playlist/list.rs (+2 -2)
📝 metadata/src/playlist/permission.rs (+1 -1)
📝 metadata/src/restriction.rs (+2 -5)
📝 oauth/Cargo.toml (+3 -0)
📝 oauth/src/lib.rs (+1 -1)
📝 playback/Cargo.toml (+3 -0)
📝 playback/src/local_file.rs (+1 -1)

...and 2 more files

📄 Description

Checks for closures which only invoke a method on the closure argument and can be replaced by referencing the method directly.

https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls


🔄 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/1655 **Author:** [@xtqqczze](https://github.com/xtqqczze) **Created:** 11/30/2025 **Status:** ✅ Merged **Merged:** 12/24/2025 **Merged by:** [@photovoltex](https://github.com/photovoltex) **Base:** `dev` ← **Head:** `clippy/redundant_closure_for_method_calls` --- ### 📝 Commits (7) - [`98c5da4`](https://github.com/librespot-org/librespot/commit/98c5da42019d23e232c040516531889fc548bb5f) fix: clippy::redundant_closure_for_method_calls - [`46a5606`](https://github.com/librespot-org/librespot/commit/46a5606d2e818f8db8f9737e9b31e46e63a80a9d) fixup! fix: clippy::redundant_closure_for_method_calls - [`987def6`](https://github.com/librespot-org/librespot/commit/987def6b5c172b56b00af25e797915e2c45bedf0) use Into::into - [`530aba8`](https://github.com/librespot-org/librespot/commit/530aba8d9c32239174369ec8cbd172e706723499) use Instant::elapsed - [`d2c4ba5`](https://github.com/librespot-org/librespot/commit/d2c4ba54788fb292c3c1bfc3448db38a0178f149) cargo fmt - [`3bb6618`](https://github.com/librespot-org/librespot/commit/3bb6618cac98467012e50c554d62848ec45c838a) enable clippy lint - [`16696a6`](https://github.com/librespot-org/librespot/commit/16696a6fb5fb99d068d367c2b885d436f528e88f) add lints to all packages ### 📊 Changes **22 files changed** (+52 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.toml` (+6 -0) 📝 `audio/Cargo.toml` (+3 -0) 📝 `audio/src/fetch/receive.rs` (+5 -1) 📝 `connect/Cargo.toml` (+3 -0) 📝 `connect/src/context_resolver.rs` (+1 -1) 📝 `core/Cargo.toml` (+3 -0) 📝 `core/src/http_client.rs` (+1 -4) 📝 `core/src/spclient.rs` (+3 -3) 📝 `discovery/Cargo.toml` (+3 -0) 📝 `metadata/Cargo.toml` (+3 -0) 📝 `metadata/src/image.rs` (+1 -1) 📝 `metadata/src/lyrics.rs` (+1 -1) 📝 `metadata/src/playlist/attribute.rs` (+2 -2) 📝 `metadata/src/playlist/list.rs` (+2 -2) 📝 `metadata/src/playlist/permission.rs` (+1 -1) 📝 `metadata/src/restriction.rs` (+2 -5) 📝 `oauth/Cargo.toml` (+3 -0) 📝 `oauth/src/lib.rs` (+1 -1) 📝 `playback/Cargo.toml` (+3 -0) 📝 `playback/src/local_file.rs` (+1 -1) _...and 2 more files_ </details> ### 📄 Description Checks for closures which only invoke a method on the closure argument and can be replaced by referencing the method directly. https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls --- <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:36 +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#1478
No description provided.