diff --git a/crates/bitwarden-generators/src/lib.rs b/crates/bitwarden-generators/src/lib.rs index 4ef8f4165..6ad628bdd 100644 --- a/crates/bitwarden-generators/src/lib.rs +++ b/crates/bitwarden-generators/src/lib.rs @@ -6,7 +6,7 @@ pub use error::GeneratorError; mod password; pub use password::{password, PasswordGeneratorRequest}; mod username; -pub use username::{username, UsernameGeneratorRequest}; +pub use username::{username, ForwarderServiceType, UsernameGeneratorRequest}; mod username_forwarders; #[cfg(feature = "mobile")] diff --git a/crates/bitwarden-generators/src/passphrase.rs b/crates/bitwarden-generators/src/passphrase.rs index cdb6d684c..57498c829 100644 --- a/crates/bitwarden-generators/src/passphrase.rs +++ b/crates/bitwarden-generators/src/passphrase.rs @@ -79,12 +79,7 @@ impl PassphraseGeneratorRequest { } } -/// Implementation of the random passphrase generator. This is not accessible to the public API. -/// See [`ClientGenerator::passphrase`](crate::ClientGenerator::passphrase) for the API function. -/// -/// # Arguments: -/// * `options`: Valid parameters used to generate the passphrase. To create it, use -/// [`PassphraseGeneratorRequest::validate_options`](PassphraseGeneratorRequest::validate_options). +/// Implementation of the random passphrase generator. pub fn passphrase(request: PassphraseGeneratorRequest) -> Result { let options = request.validate_options()?; Ok(passphrase_with_rng(rand::thread_rng(), options)) diff --git a/crates/bitwarden-generators/src/password.rs b/crates/bitwarden-generators/src/password.rs index 4b90b33b7..078dbf994 100644 --- a/crates/bitwarden-generators/src/password.rs +++ b/crates/bitwarden-generators/src/password.rs @@ -217,8 +217,7 @@ impl PasswordGeneratorRequest { } } -/// Implementation of the random password generator. This is not accessible to the public API. -/// See [`ClientGenerator::password`](crate::ClientGenerator::password) for the API function. +/// Implementation of the random password generator. pub fn password(input: PasswordGeneratorRequest) -> Result { let options = input.validate_options()?; Ok(password_with_rng(rand::thread_rng(), options)) diff --git a/crates/bitwarden-generators/src/username.rs b/crates/bitwarden-generators/src/username.rs index 66d27a29f..05481c938 100644 --- a/crates/bitwarden-generators/src/username.rs +++ b/crates/bitwarden-generators/src/username.rs @@ -127,8 +127,8 @@ impl ForwarderServiceType { } } -/// Implementation of the username generator. This is not accessible to the public API. -/// See [`ClientGenerator::username`](crate::ClientGenerator::username) for the API function. +/// Implementation of the username generator. +/// /// Note: The HTTP client is passed in as a required parameter for convenience, /// as some username generators require making API calls. pub async fn username(