From 61b8b28e86690ff50422a0a72e6d7fa1b8668992 Mon Sep 17 00:00:00 2001 From: David Niehues <7667041+DavidNiehues@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:27:40 +0100 Subject: [PATCH] style(ciphers): improve style in doc-tests around using the the ?-operator in the ciphers crate --- ciphers/src/hash_domain.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ciphers/src/hash_domain.rs b/ciphers/src/hash_domain.rs index 2b05ffe..2f67460 100644 --- a/ciphers/src/hash_domain.rs +++ b/ciphers/src/hash_domain.rs @@ -13,7 +13,6 @@ pub use hash::KEY_LEN; /// # rosenpass_secret_memory::secret_policy_use_only_malloc_secrets(); /// /// const PROTOCOL_IDENTIFIER: &str = "MY_PROTOCOL:IDENTIFIER"; -/// # fn do_doc_test() -> Result<(), Box> { /// // create use once hash domain for the protocol identifier /// let mut hash_domain = HashDomain::zero(); /// 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 = secret_hash_domain.mix(new_key_identifier)?.into_secret(); /// -/// # Ok(()) -/// # } -/// # do_doc_test().unwrap(); -/// +/// # Ok::<(), anyhow::Error>(()) ///``` ///