style(clippy): enforce clippy use_self lint

Clippy's `use_self` line ensures that `Self` is used instead of the real
name whenever possible. This makes searching easier and cleans up the
code a bit.
This commit is contained in:
Thomas Frans
2023-09-27 21:53:13 +02:00
committed by Henrik Friedrichsen
parent 01e01b59e4
commit fe8f8e78ee
25 changed files with 170 additions and 172 deletions

View File

@@ -49,7 +49,7 @@ impl SearchResultsView {
events: EventManager,
queue: Arc<Queue>,
library: Arc<Library>,
) -> SearchResultsView {
) -> Self {
let results_tracks = Arc::new(RwLock::new(Vec::new()));
let results_albums = Arc::new(RwLock::new(Vec::new()));
let results_artists = Arc::new(RwLock::new(Vec::new()));
@@ -79,7 +79,7 @@ impl SearchResultsView {
.tab("shows", list_shows.with_title("Podcasts"))
.tab("episodes", list_episodes.with_title("Podcast Episodes"));
let mut view = SearchResultsView {
let mut view = Self {
search_term,
results_tracks,
pagination_tracks,