From f84fd68ac825023526575ca65a26b610f9cd2c5e Mon Sep 17 00:00:00 2001 From: pixelrazor Date: Tue, 11 Apr 2023 08:09:01 -0600 Subject: [PATCH] More clippy fixes --- server/tests/common/env.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/server/tests/common/env.rs b/server/tests/common/env.rs index f377887..449a87f 100644 --- a/server/tests/common/env.rs +++ b/server/tests/common/env.rs @@ -4,8 +4,7 @@ pub const DB_KEY: &str = "LLDAP_DATABASE_URL"; pub fn database_url() -> String { let url = var(DB_KEY).ok(); - let url = url.unwrap_or("sqlite://e2e_test.db?mode=rwc".to_string()); - url + url.unwrap_or("sqlite://e2e_test.db?mode=rwc".to_string()) } pub fn ldap_url() -> String { @@ -26,18 +25,15 @@ pub fn http_url() -> String { pub fn admin_dn() -> String { let user = var("LLDAP_LDAP_USER_DN").ok(); - let user = user.unwrap_or("admin".to_string()); - user + user.unwrap_or("admin".to_string()) } pub fn admin_password() -> String { let pass = var("LLDAP_LDAP_USER_PASS").ok(); - let pass = pass.unwrap_or("password".to_string()); - pass + pass.unwrap_or("password".to_string()) } pub fn base_dn() -> String { let dn = var("LLDAP_LDAP_BASE_DN").ok(); - let dn = dn.unwrap_or("dc=example,dc=com".to_string()); - dn + dn.unwrap_or("dc=example,dc=com".to_string()) }