From 8b655f36b868cb023dcdd1ff712de80a59ccbdb1 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 6 Apr 2020 21:42:35 -0400 Subject: clippy --- src/api.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/api.rs') diff --git a/src/api.rs b/src/api.rs index de5a70d..9637630 100644 --- a/src/api.rs +++ b/src/api.rs @@ -76,15 +76,23 @@ pub struct Client { identity_url_base: String, } -impl Client { - #[allow(dead_code)] - pub fn new() -> Self { +impl Default for Client { + fn default() -> Self { Self { api_url_base: "https://api.bitwarden.com".to_string(), identity_url_base: "https://identity.bitwarden.com".to_string(), } } +} + +impl Client { + #[allow(dead_code)] + #[must_use] + pub fn new() -> Self { + Self::default() + } + #[must_use] pub fn new_self_hosted(base_url: &str) -> Self { Self { api_url_base: format!("{}/api", base_url), -- cgit v1.2.3-54-g00ecf