lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

commit 3acd0fb0e61851ab20f85dedd7fa8aea6b98b495
parent b0526d0ea1514533e4f1a36b20e67cc3fc47f324
Author: triesap <tyson@radroots.org>
Date:   Sun, 21 Jun 2026 18:22:20 +0000

coverage: narrow coverage exclusions

Diffstat:
Mcrates/geocoder/src/geocoder.rs | 4----
Mcrates/identity/src/storage.rs | 15---------------
Mcrates/nostr_signer/src/manager.rs | 1-
Mcrates/trade/src/order.rs | 3---
4 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/crates/geocoder/src/geocoder.rs b/crates/geocoder/src/geocoder.rs @@ -12,7 +12,6 @@ pub struct Geocoder { } impl Geocoder { - #[cfg_attr(coverage_nightly, coverage(off))] pub fn open_path<P: AsRef<Path>>(path: P) -> Result<Self, GeocoderError> { let conn = Connection::open(path)?; Ok(Self { @@ -21,7 +20,6 @@ impl Geocoder { }) } - #[cfg_attr(coverage_nightly, coverage(off))] pub fn open_bytes(bytes: &[u8]) -> Result<Self, GeocoderError> { let mut temp = tempfile::NamedTempFile::new()?; temp.as_file_mut().write_all(bytes)?; @@ -153,7 +151,6 @@ fn finalize_country_center( }) } -#[cfg_attr(coverage_nightly, coverage(off))] fn country_center_impl( conn: &Connection, country_id: &str, @@ -174,7 +171,6 @@ fn country_center_impl( Ok(None) } -#[cfg_attr(coverage_nightly, coverage(off))] fn collect_mapped_rows<T, P, F>( stmt: &mut rusqlite::Statement<'_>, params: P, diff --git a/crates/identity/src/storage.rs b/crates/identity/src/storage.rs @@ -20,7 +20,6 @@ pub struct RadrootsEncryptedIdentityFile { impl RadrootsEncryptedIdentityFile { #[must_use] - #[cfg_attr(coverage_nightly, coverage(off))] pub fn new(path: impl AsRef<Path>) -> Self { Self::new_path(path.as_ref()) } @@ -31,7 +30,6 @@ impl RadrootsEncryptedIdentityFile { } #[must_use] - #[cfg_attr(coverage_nightly, coverage(off))] pub fn with_key_slot(path: impl AsRef<Path>, key_slot: impl Into<Cow<'static, str>>) -> Self { Self::with_key_slot_path(path.as_ref(), key_slot) } @@ -152,7 +150,6 @@ struct EncryptedIdentityRotationBackup { } #[must_use] -#[cfg_attr(coverage_nightly, coverage(off))] pub fn encrypted_identity_wrapping_key_path(path: impl AsRef<Path>) -> PathBuf { encrypted_identity_wrapping_key_path_ref(path.as_ref()) } @@ -161,7 +158,6 @@ fn encrypted_identity_wrapping_key_path_ref(path: &Path) -> PathBuf { sidecar_path(path, RADROOTS_ENCRYPTED_IDENTITY_KEY_SUFFIX) } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn store_encrypted_identity( path: impl AsRef<Path>, identity: &RadrootsIdentity, @@ -176,7 +172,6 @@ fn store_encrypted_identity_path( RadrootsEncryptedIdentityFile::new_path(path).store(identity) } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn store_encrypted_identity_with_key_slot( path: impl AsRef<Path>, key_slot: impl Into<Cow<'static, str>>, @@ -193,7 +188,6 @@ fn store_encrypted_identity_with_key_slot_path( RadrootsEncryptedIdentityFile::with_key_slot_path(path, key_slot).store(identity) } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn rotate_encrypted_identity(path: impl AsRef<Path>) -> Result<(), IdentityError> { rotate_encrypted_identity_path(path.as_ref()) } @@ -202,7 +196,6 @@ fn rotate_encrypted_identity_path(path: &Path) -> Result<(), IdentityError> { RadrootsEncryptedIdentityFile::new_path(path).rotate() } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn rotate_encrypted_identity_with_key_slot( path: impl AsRef<Path>, key_slot: impl Into<Cow<'static, str>>, @@ -217,7 +210,6 @@ fn rotate_encrypted_identity_with_key_slot_path( RadrootsEncryptedIdentityFile::with_key_slot_path(path, key_slot).rotate() } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn load_encrypted_identity(path: impl AsRef<Path>) -> Result<RadrootsIdentity, IdentityError> { load_encrypted_identity_path(path.as_ref()) } @@ -226,7 +218,6 @@ fn load_encrypted_identity_path(path: &Path) -> Result<RadrootsIdentity, Identit RadrootsEncryptedIdentityFile::new_path(path).load() } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn load_encrypted_identity_with_key_slot( path: impl AsRef<Path>, key_slot: impl Into<Cow<'static, str>>, @@ -241,7 +232,6 @@ fn load_encrypted_identity_with_key_slot_path( RadrootsEncryptedIdentityFile::with_key_slot_path(path, key_slot).load() } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn store_identity_profile( path: impl AsRef<Path>, identity: &RadrootsIdentity, @@ -266,7 +256,6 @@ fn store_identity_profile_path( Ok(()) } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn load_identity_profile( path: impl AsRef<Path>, ) -> Result<RadrootsIdentityPublic, IdentityError> { @@ -287,18 +276,15 @@ fn load_identity_profile_path(path: &Path) -> Result<RadrootsIdentityPublic, Ide RadrootsIdentity::load_from_path_auto(path).map(|identity| identity.to_public()) } -#[cfg_attr(coverage_nightly, coverage(off))] fn identity_file_payload(identity: &RadrootsIdentity) -> Vec<u8> { serde_json::to_vec(&identity.to_file()).expect("identity file serialization is infallible") } -#[cfg_attr(coverage_nightly, coverage(off))] fn identity_profile_payload(identity: &RadrootsIdentity) -> Vec<u8> { serde_json::to_vec_pretty(&identity.to_public()) .expect("identity profile serialization is infallible") } -#[cfg_attr(coverage_nightly, coverage(off))] fn encode_encrypted_identity(envelope: &RadrootsProtectedStoreEnvelope) -> Vec<u8> { envelope .encode_json() @@ -321,7 +307,6 @@ fn protected_storage_message( } } -#[cfg_attr(coverage_nightly, coverage(off))] fn secret_permission_error(path: &Path, error: RadrootsSecretVaultAccessError) -> IdentityError { protected_storage_message(path, "update secret-file permissions", &error) } diff --git a/crates/nostr_signer/src/manager.rs b/crates/nostr_signer/src/manager.rs @@ -931,7 +931,6 @@ impl RadrootsNostrSignerManager { Ok(value) } - #[cfg_attr(coverage_nightly, coverage(off))] fn resolve_connect_request_context( &self, remote_signer_public_key: PublicKey, diff --git a/crates/trade/src/order.rs b/crates/trade/src/order.rs @@ -558,7 +558,6 @@ struct RadrootsListingInventoryAccountingRecords { cancellations: Vec<RadrootsOrderCancellationRecord>, } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn reduce_order_events<I, J, K, L, M>( order_id: &RadrootsOrderId, inputs: RadrootsOrderReductionInputs<I, J, K, L, M>, @@ -582,7 +581,6 @@ where ) } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn reduce_order_event_records<I>( order_id: &RadrootsOrderId, records: I, @@ -750,7 +748,6 @@ fn reduce_grouped_order_event_records( } } -#[cfg_attr(coverage_nightly, coverage(off))] pub fn reduce_listing_inventory_accounting<I, J, K, L, M, N>( listing_addr: &RadrootsListingAddress, listing_event_id: &RadrootsEventId,