diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-06 21:42:35 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-06 21:42:35 -0400 |
commit | 8b655f36b868cb023dcdd1ff712de80a59ccbdb1 (patch) | |
tree | dce0912bb14147346ee0fa35f1b971f6364a51bc /src/api.rs | |
parent | ca02ec8ca2b24ae7997de80b662cfd3635d75e9e (diff) | |
download | rbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.tar.gz rbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.zip |
clippy
Diffstat (limited to 'src/api.rs')
-rw-r--r-- | src/api.rs | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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), |