ci: Exclude Debug implementations from coverage reports

We don't really want to check for exact representations, and otherwise
they are really just invoked in tests that fail.
This commit is contained in:
Jonas Platte
2023-02-10 13:25:54 +01:00
committed by Jonas Platte
parent 441626bf68
commit e430f65ce8
7 changed files with 9 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ impl Session {
}
}
#[cfg(not(tarpaulin_include))]
impl fmt::Debug for Session {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Session")

View File

@@ -642,6 +642,7 @@ impl Store {
}
}
#[cfg(not(tarpaulin_include))]
impl fmt::Debug for Store {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Store")

View File

@@ -195,6 +195,7 @@ impl RecoveryKey {
}
}
#[cfg(not(tarpaulin_include))]
impl Debug for RecoveryKey {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("RecoveryKey").finish()
@@ -245,6 +246,7 @@ pub struct CrossSigningKeyExport {
pub user_signing_key: Option<String>,
}
#[cfg(not(tarpaulin_include))]
impl Debug for CrossSigningKeyExport {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("CrossSigningKeyExport")

View File

@@ -67,6 +67,7 @@ pub struct SqliteCryptoStore {
session_cache: SessionStore,
}
#[cfg(not(tarpaulin_include))]
impl fmt::Debug for SqliteCryptoStore {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if let Some(path) = &self.path {

View File

@@ -484,6 +484,7 @@ enum BuilderStoreConfig {
Custom(StoreConfig),
}
#[cfg(not(tarpaulin_include))]
impl fmt::Debug for BuilderStoreConfig {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[allow(clippy::infallible_destructuring_match)]

View File

@@ -34,6 +34,7 @@ impl Default for SyncSettings {
}
}
#[cfg(not(tarpaulin_include))]
impl fmt::Debug for SyncSettings {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut s = f.debug_struct("SyncSettings");

View File

@@ -338,6 +338,7 @@ impl From<RemoteEventTimelineItem> for EventTimelineItem {
}
}
#[cfg(not(tarpaulin_include))]
impl fmt::Debug for RemoteEventTimelineItem {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("RemoteEventTimelineItem")
@@ -509,6 +510,7 @@ impl Message {
}
}
#[cfg(not(tarpaulin_include))]
impl fmt::Debug for Message {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// since timeline items are logged, don't include all fields here so