From b4c95fb4ac5176ffc17f408e15e12b6e19a17c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Wed, 22 Sep 2021 21:39:31 +0200 Subject: [PATCH] Hide some warnings for unused struct fields --- src/api/core/accounts.rs | 1 + src/api/core/organizations.rs | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index 435a2cd1..4e613a37 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -49,6 +49,7 @@ struct RegisterData { MasterPasswordHint: Option, Name: Option, Token: Option, + #[allow(dead_code)] OrganizationUserId: Option, } diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index 0f49a54e..8de3ec62 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -377,7 +377,7 @@ fn delete_organization_collection( } #[derive(Deserialize, Debug)] -#[allow(non_snake_case)] +#[allow(non_snake_case, dead_code)] struct DeleteCollectionData { Id: String, OrgId: String, @@ -1301,7 +1301,7 @@ fn get_plans_tax_rates(_headers: Headers, _conn: DbConn) -> Json { } #[derive(Deserialize, Debug)] -#[allow(non_snake_case)] +#[allow(non_snake_case, dead_code)] struct OrgImportGroupData { Name: String, // "GroupName" ExternalId: String, // "cn=GroupName,ou=Groups,dc=example,dc=com" @@ -1311,7 +1311,8 @@ struct OrgImportGroupData { #[derive(Deserialize, Debug)] #[allow(non_snake_case)] struct OrgImportUserData { - Email: String, // "user@maildomain.net" + Email: String, // "user@maildomain.net" + #[allow(dead_code)] ExternalId: String, // "uid=user,ou=People,dc=example,dc=com" Deleted: bool, } @@ -1319,6 +1320,7 @@ struct OrgImportUserData { #[derive(Deserialize, Debug)] #[allow(non_snake_case)] struct OrgImportData { + #[allow(dead_code)] Groups: Vec, OverwriteExisting: bool, Users: Vec,