Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Jan 16, 2024
1 parent 5c0ff89 commit 27ccec9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/bitwarden-generators/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
7 changes: 1 addition & 6 deletions crates/bitwarden-generators/src/passphrase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, GeneratorError> {

Check warning on line 83 in crates/bitwarden-generators/src/passphrase.rs

View check run for this annotation

Codecov / codecov/patch

crates/bitwarden-generators/src/passphrase.rs#L83

Added line #L83 was not covered by tests
let options = request.validate_options()?;
Ok(passphrase_with_rng(rand::thread_rng(), options))
Expand Down
3 changes: 1 addition & 2 deletions crates/bitwarden-generators/src/password.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, GeneratorError> {

Check warning on line 221 in crates/bitwarden-generators/src/password.rs

View check run for this annotation

Codecov / codecov/patch

crates/bitwarden-generators/src/password.rs#L221

Added line #L221 was not covered by tests
let options = input.validate_options()?;
Ok(password_with_rng(rand::thread_rng(), options))
Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-generators/src/username.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(

Check warning on line 134 in crates/bitwarden-generators/src/username.rs

View check run for this annotation

Codecov / codecov/patch

crates/bitwarden-generators/src/username.rs#L134

Added line #L134 was not covered by tests
Expand Down

0 comments on commit 27ccec9

Please sign in to comment.