aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-06 21:42:35 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-06 21:42:35 -0400
commit8b655f36b868cb023dcdd1ff712de80a59ccbdb1 (patch)
treedce0912bb14147346ee0fa35f1b971f6364a51bc /src/api.rs
parentca02ec8ca2b24ae7997de80b662cfd3635d75e9e (diff)
downloadrbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.tar.gz
rbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.zip
clippy
Diffstat (limited to 'src/api.rs')
-rw-r--r--src/api.rs14
1 files changed, 11 insertions, 3 deletions
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),