Skip to content

Commit 6b98aaf

Browse files
committed
allow dead code on struct
1 parent 6861006 commit 6b98aaf

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

crates/bitwarden-core/src/auth/api/response/user_decryption_options_response.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use serde::{Deserialize, Serialize};
33

44
/// Provides user decryption options used to unlock user's vault.
55
/// Currently, only master password unlock is supported.
6+
#[allow(dead_code)]
67
#[derive(Serialize, Deserialize, Debug, PartialEq)]
78
pub(crate) struct UserDecryptionOptionsResponseModel {
89
/// Contains information needed to unlock user's vault with master password.

crates/bitwarden-core/src/auth/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ use crate::{NotAuthenticatedError, VaultLockedError, WrongPasswordError};
99
mod access_token;
1010
// API is intentionally not visible outside of `auth` as these should be considered private.
1111
mod api;
12-
pub(crate) use api::response::user_decryption_options_response;
12+
#[cfg(feature = "internal")]
13+
pub(crate) use api::response::user_decryption_options_response::UserDecryptionOptionsResponseModel;
1314
#[allow(missing_docs)]
1415
pub mod auth_client;
1516
mod jwt_token;

crates/bitwarden-core/src/key_management/master_password.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use serde::{Deserialize, Serialize};
1010
use crate::{require, MissingFieldError};
1111

1212
/// Error for master password related operations.
13+
#[allow(dead_code)]
1314
#[bitwarden_error(flat)]
1415
#[derive(Debug, thiserror::Error)]
1516
pub(crate) enum MasterPasswordError {
@@ -25,6 +26,7 @@ pub(crate) enum MasterPasswordError {
2526
}
2627

2728
/// Represents the data required to unlock with the master password.
29+
#[allow(dead_code)]
2830
#[derive(Serialize, Deserialize, Debug)]
2931
#[serde(rename_all = "camelCase", deny_unknown_fields)]
3032
pub(crate) struct MasterPasswordUnlockData {

crates/bitwarden-core/src/key_management/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod crypto_client;
1919
#[cfg(feature = "internal")]
2020
pub use crypto_client::CryptoClient;
2121

22-
#[cfg_attr(feature = "internal", allow(dead_code))]
22+
#[cfg(feature = "internal")]
2323
mod master_password;
2424
#[cfg(feature = "internal")]
2525
mod non_generic_wrappers;
@@ -28,7 +28,7 @@ mod non_generic_wrappers;
2828
pub(crate) use non_generic_wrappers::*;
2929
#[cfg(feature = "internal")]
3030
mod security_state;
31-
#[cfg_attr(feature = "internal", allow(dead_code))]
31+
#[cfg(feature = "internal")]
3232
mod user_decryption;
3333
#[cfg(feature = "internal")]
3434
pub use security_state::{SecurityState, SignedSecurityState};

crates/bitwarden-core/src/key_management/user_decryption.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ use bitwarden_api_api::models::UserDecryptionResponseModel;
22
use serde::{Deserialize, Serialize};
33

44
use crate::{
5-
auth::user_decryption_options_response::UserDecryptionOptionsResponseModel,
5+
auth::UserDecryptionOptionsResponseModel,
66
key_management::master_password::{MasterPasswordError, MasterPasswordUnlockData},
77
};
88

99
/// Represents data required to decrypt user's vault.
1010
/// Currently, this is only used for master password unlock.
11+
#[allow(dead_code)]
1112
#[derive(Serialize, Deserialize, Debug)]
1213
#[serde(rename_all = "camelCase", deny_unknown_fields)]
1314
struct UserDecryptionData {

0 commit comments

Comments
 (0)