Update Rust version, deps and workflow

- Update Rust to v1.65.0
- Update dependencies
- Updated workflow files
- Added some extra clippy checks
- Fixed some clippy checks
This commit is contained in:
BlackDex
2022-11-04 12:56:02 +01:00
committed by Daniel García
parent c9ec389b24
commit 439ef44973
30 changed files with 147 additions and 154 deletions

View File

@@ -554,9 +554,9 @@ async fn diagnostics(_token: AdminToken, ip_header: IpHeader, mut conn: DbConn)
// Get current running versions
let web_vault_version: WebVaultVersion =
match std::fs::read_to_string(&format!("{}/{}", CONFIG.web_vault_folder(), "vw-version.json")) {
match std::fs::read_to_string(format!("{}/{}", CONFIG.web_vault_folder(), "vw-version.json")) {
Ok(s) => serde_json::from_str(&s)?,
_ => match std::fs::read_to_string(&format!("{}/{}", CONFIG.web_vault_folder(), "version.json")) {
_ => match std::fs::read_to_string(format!("{}/{}", CONFIG.web_vault_folder(), "version.json")) {
Ok(s) => serde_json::from_str(&s)?,
_ => WebVaultVersion {
version: String::from("Version file missing"),

View File

@@ -733,7 +733,7 @@ async fn bulk_reinvite_user(
let mut bulk_response = Vec::new();
for org_user_id in data.Ids {
let err_msg = match _reinvite_user(&org_id, &org_user_id, &headers.user.email, &mut conn).await {
Ok(_) => String::from(""),
Ok(_) => String::new(),
Err(e) => format!("{:?}", e),
};
@@ -892,7 +892,7 @@ async fn bulk_confirm_invite(
let org_user_id = invite["Id"].as_str().unwrap_or_default();
let user_key = invite["Key"].as_str().unwrap_or_default();
let err_msg = match _confirm_invite(&org_id, org_user_id, user_key, &headers, &mut conn).await {
Ok(_) => String::from(""),
Ok(_) => String::new(),
Err(e) => format!("{:?}", e),
};
@@ -1110,7 +1110,7 @@ async fn bulk_delete_user(
let mut bulk_response = Vec::new();
for org_user_id in data.Ids {
let err_msg = match _delete_user(&org_id, &org_user_id, &headers, &mut conn).await {
Ok(_) => String::from(""),
Ok(_) => String::new(),
Err(e) => format!("{:?}", e),
};
@@ -1587,7 +1587,7 @@ async fn bulk_revoke_organization_user(
for org_user_id in org_users {
let org_user_id = org_user_id.as_str().unwrap_or_default();
let err_msg = match _revoke_organization_user(&org_id, org_user_id, &headers, &mut conn).await {
Ok(_) => String::from(""),
Ok(_) => String::new(),
Err(e) => format!("{:?}", e),
};
@@ -1686,7 +1686,7 @@ async fn bulk_restore_organization_user(
for org_user_id in org_users {
let org_user_id = org_user_id.as_str().unwrap_or_default();
let err_msg = match _restore_organization_user(&org_id, org_user_id, &headers, &mut conn).await {
Ok(_) => String::from(""),
Ok(_) => String::new(),
Err(e) => format!("{:?}", e),
};

View File

@@ -520,7 +520,7 @@ async fn get_icon_url(domain: &str) -> Result<IconUrlResult, Error> {
// Create the iconlist
let mut iconlist: Vec<Icon> = Vec::new();
let mut referer = String::from("");
let mut referer = String::new();
if let Ok(content) = resp {
// Extract the URL from the respose in case redirects occured (like @ gitlab.com)