From 763b5b62ee74966abe860ed8207ae04dfe35c831 Mon Sep 17 00:00:00 2001 From: Koen Bolhuis Date: Fri, 3 Dec 2021 12:54:54 +0100 Subject: [PATCH] Implement Default for raw::Client and wrapper::ListenBrainz Following clippy recommendations --- src/raw/client.rs | 6 ++++++ src/wrapper.rs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/raw/client.rs b/src/raw/client.rs index 74161c5..90e5e16 100644 --- a/src/raw/client.rs +++ b/src/raw/client.rs @@ -348,3 +348,9 @@ impl Client { ResponseType::from_response(response) } } + +impl Default for Client { + fn default() -> Self { + Self::new() + } +} diff --git a/src/wrapper.rs b/src/wrapper.rs index 5d0cb6a..4db387f 100644 --- a/src/wrapper.rs +++ b/src/wrapper.rs @@ -147,3 +147,9 @@ impl ListenBrainz { self.submit_listen(ListenType::PlayingNow, None, artist, track, release) } } + +impl Default for ListenBrainz { + fn default() -> Self { + Self::new() + } +}