style(ciphers): improve style in doc-tests around using the the ?-operator in the ciphers crate

This commit is contained in:
David Niehues
2024-12-16 17:27:40 +01:00
committed by Amin Faez
parent 9cc860fdeb
commit 61b8b28e86

View File

@@ -13,7 +13,6 @@ pub use hash::KEY_LEN;
/// # rosenpass_secret_memory::secret_policy_use_only_malloc_secrets(); /// # rosenpass_secret_memory::secret_policy_use_only_malloc_secrets();
/// ///
/// const PROTOCOL_IDENTIFIER: &str = "MY_PROTOCOL:IDENTIFIER"; /// const PROTOCOL_IDENTIFIER: &str = "MY_PROTOCOL:IDENTIFIER";
/// # fn do_doc_test() -> Result<(), Box<dyn std::error::Error>> {
/// // create use once hash domain for the protocol identifier /// // create use once hash domain for the protocol identifier
/// let mut hash_domain = HashDomain::zero(); /// let mut hash_domain = HashDomain::zero();
/// hash_domain = hash_domain.mix(PROTOCOL_IDENTIFIER.as_bytes())?; /// hash_domain = hash_domain.mix(PROTOCOL_IDENTIFIER.as_bytes())?;
@@ -31,10 +30,7 @@ pub use hash::KEY_LEN;
/// let new_key_identifier = "my_new_key_identifier".as_bytes(); /// let new_key_identifier = "my_new_key_identifier".as_bytes();
/// let new_key = secret_hash_domain.mix(new_key_identifier)?.into_secret(); /// let new_key = secret_hash_domain.mix(new_key_identifier)?.into_secret();
/// ///
/// # Ok(()) /// # Ok::<(), anyhow::Error>(())
/// # }
/// # do_doc_test().unwrap();
///
///``` ///```
/// ///