From ce62e898c3de0ec160354d0f7f622b03a1f48c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Sat, 13 Mar 2021 22:04:04 +0100 Subject: [PATCH] Remove debug impl from database structs This is only implemented for the database specific structs, which is not what we want --- src/db/models/attachment.rs | 2 +- src/db/models/cipher.rs | 2 +- src/db/models/collection.rs | 6 +++--- src/db/models/device.rs | 2 +- src/db/models/favorite.rs | 2 +- src/db/models/folder.rs | 4 ++-- src/db/models/org_policy.rs | 2 +- src/db/models/organization.rs | 4 ++-- src/db/models/two_factor.rs | 2 +- src/db/models/user.rs | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/db/models/attachment.rs b/src/db/models/attachment.rs index f89a6dbc..6a8fc5b0 100644 --- a/src/db/models/attachment.rs +++ b/src/db/models/attachment.rs @@ -4,7 +4,7 @@ use super::Cipher; use crate::CONFIG; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] #[table_name = "attachments"] #[changeset_options(treat_none_as_null="true")] #[belongs_to(super::Cipher, foreign_key = "cipher_uuid")] diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index d41ebfb8..da3eabab 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -14,7 +14,7 @@ use super::{ }; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] #[table_name = "ciphers"] #[changeset_options(treat_none_as_null="true")] #[belongs_to(User, foreign_key = "user_uuid")] diff --git a/src/db/models/collection.rs b/src/db/models/collection.rs index 4e75279d..5fbc3128 100644 --- a/src/db/models/collection.rs +++ b/src/db/models/collection.rs @@ -3,7 +3,7 @@ use serde_json::Value; use super::{Organization, UserOrgStatus, UserOrgType, UserOrganization, User, Cipher}; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] #[table_name = "collections"] #[belongs_to(Organization, foreign_key = "org_uuid")] #[primary_key(uuid)] @@ -13,7 +13,7 @@ db_object! { pub name: String, } - #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] + #[derive(Identifiable, Queryable, Insertable, Associations)] #[table_name = "users_collections"] #[belongs_to(User, foreign_key = "user_uuid")] #[belongs_to(Collection, foreign_key = "collection_uuid")] @@ -25,7 +25,7 @@ db_object! { pub hide_passwords: bool, } - #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] + #[derive(Identifiable, Queryable, Insertable, Associations)] #[table_name = "ciphers_collections"] #[belongs_to(Cipher, foreign_key = "cipher_uuid")] #[belongs_to(Collection, foreign_key = "collection_uuid")] diff --git a/src/db/models/device.rs b/src/db/models/device.rs index 0172ffb5..b3413ada 100644 --- a/src/db/models/device.rs +++ b/src/db/models/device.rs @@ -4,7 +4,7 @@ use super::User; use crate::CONFIG; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] #[table_name = "devices"] #[changeset_options(treat_none_as_null="true")] #[belongs_to(User, foreign_key = "user_uuid")] diff --git a/src/db/models/favorite.rs b/src/db/models/favorite.rs index f419e07d..4f610f21 100644 --- a/src/db/models/favorite.rs +++ b/src/db/models/favorite.rs @@ -1,7 +1,7 @@ use super::{Cipher, User}; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] + #[derive(Identifiable, Queryable, Insertable, Associations)] #[table_name = "favorites"] #[belongs_to(User, foreign_key = "user_uuid")] #[belongs_to(Cipher, foreign_key = "cipher_uuid")] diff --git a/src/db/models/folder.rs b/src/db/models/folder.rs index 3656afb3..b5bbcc79 100644 --- a/src/db/models/folder.rs +++ b/src/db/models/folder.rs @@ -4,7 +4,7 @@ use serde_json::Value; use super::{Cipher, User}; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] #[table_name = "folders"] #[belongs_to(User, foreign_key = "user_uuid")] #[primary_key(uuid)] @@ -16,7 +16,7 @@ db_object! { pub name: String, } - #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] + #[derive(Identifiable, Queryable, Insertable, Associations)] #[table_name = "folders_ciphers"] #[belongs_to(Cipher, foreign_key = "cipher_uuid")] #[belongs_to(Folder, foreign_key = "folder_uuid")] diff --git a/src/db/models/org_policy.rs b/src/db/models/org_policy.rs index 679b7e57..65569b48 100644 --- a/src/db/models/org_policy.rs +++ b/src/db/models/org_policy.rs @@ -7,7 +7,7 @@ use crate::error::MapResult; use super::{Organization, UserOrgStatus}; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] #[table_name = "org_policies"] #[belongs_to(Organization, foreign_key = "org_uuid")] #[primary_key(uuid)] diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index ade0040b..2e93426d 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -5,7 +5,7 @@ use num_traits::FromPrimitive; use super::{CollectionUser, User, OrgPolicy}; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, AsChangeset)] #[table_name = "organizations"] #[primary_key(uuid)] pub struct Organization { @@ -14,7 +14,7 @@ db_object! { pub billing_email: String, } - #[derive(Debug, Identifiable, Queryable, Insertable, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, AsChangeset)] #[table_name = "users_organizations"] #[primary_key(uuid)] pub struct UserOrganization { diff --git a/src/db/models/two_factor.rs b/src/db/models/two_factor.rs index 79a35c19..18073bad 100644 --- a/src/db/models/two_factor.rs +++ b/src/db/models/two_factor.rs @@ -7,7 +7,7 @@ use crate::error::MapResult; use super::User; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] #[table_name = "twofactor"] #[belongs_to(User, foreign_key = "user_uuid")] #[primary_key(uuid)] diff --git a/src/db/models/user.rs b/src/db/models/user.rs index eab46e51..e1ddf456 100644 --- a/src/db/models/user.rs +++ b/src/db/models/user.rs @@ -5,7 +5,7 @@ use crate::crypto; use crate::CONFIG; db_object! { - #[derive(Debug, Identifiable, Queryable, Insertable, AsChangeset)] + #[derive(Identifiable, Queryable, Insertable, AsChangeset)] #[table_name = "users"] #[changeset_options(treat_none_as_null="true")] #[primary_key(uuid)] @@ -47,7 +47,7 @@ db_object! { } - #[derive(Debug, Identifiable, Queryable, Insertable)] + #[derive(Identifiable, Queryable, Insertable)] #[table_name = "invitations"] #[primary_key(email)] pub struct Invitation {