Add exclusions for code coverage
This commit is contained in:
parent
7bbbf44328
commit
0300135a6a
7 changed files with 14 additions and 1 deletions
5
src/cache/mem.rs
vendored
5
src/cache/mem.rs
vendored
|
@ -86,6 +86,7 @@ pub trait InternalMemoryCache: Sync + Send {
|
|||
fn pop(&mut self) -> Option<(CacheKey, CacheValue)>;
|
||||
}
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
impl InternalMemoryCacheInitializer for Lfu {
|
||||
#[inline]
|
||||
fn new() -> Self {
|
||||
|
@ -93,6 +94,7 @@ impl InternalMemoryCacheInitializer for Lfu {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
impl InternalMemoryCache for Lfu {
|
||||
#[inline]
|
||||
fn get(&mut self, key: &CacheKey) -> Option<Cow<CacheValue>> {
|
||||
|
@ -110,6 +112,7 @@ impl InternalMemoryCache for Lfu {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
impl InternalMemoryCacheInitializer for Lru {
|
||||
#[inline]
|
||||
fn new() -> Self {
|
||||
|
@ -117,6 +120,7 @@ impl InternalMemoryCacheInitializer for Lru {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
impl InternalMemoryCache for Lru {
|
||||
#[inline]
|
||||
fn get(&mut self, key: &CacheKey) -> Option<Cow<CacheValue>> {
|
||||
|
@ -134,6 +138,7 @@ impl InternalMemoryCache for Lru {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
impl InternalMemoryCache for RedisClient {
|
||||
fn get(&mut self, key: &CacheKey) -> Option<Cow<CacheValue>> {
|
||||
Commands::get(self, key).ok().map(Cow::Owned)
|
||||
|
|
1
src/cache/mod.rs
vendored
1
src/cache/mod.rs
vendored
|
@ -229,6 +229,7 @@ pub trait CallbackCache: Cache {
|
|||
#[async_trait]
|
||||
impl<T: CallbackCache> CallbackCache for Arc<T> {
|
||||
#[inline]
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
async fn put_with_on_completed_callback(
|
||||
&self,
|
||||
key: CacheKey,
|
||||
|
|
|
@ -45,6 +45,7 @@ pub static HTTP_CLIENT: Lazy<CachingClient> = Lazy::new(|| {
|
|||
}
|
||||
});
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
pub static DEFAULT_HEADERS: Lazy<HeaderMap> = Lazy::new(|| {
|
||||
let mut headers = HeaderMap::with_capacity(8);
|
||||
headers.insert(X_CONTENT_TYPE_OPTIONS, HeaderValue::from_static("nosniff"));
|
||||
|
|
|
@ -42,7 +42,6 @@ mod metrics;
|
|||
mod ping;
|
||||
mod routes;
|
||||
mod state;
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
mod stop;
|
||||
mod units;
|
||||
|
||||
|
@ -252,6 +251,7 @@ enum InvalidCombination {
|
|||
MissingUnstableOption(&'static str, UnstableOptions),
|
||||
}
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
impl Display for InvalidCombination {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
|
@ -268,6 +268,7 @@ impl Display for InvalidCombination {
|
|||
|
||||
impl Error for InvalidCombination {}
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
fn print_preamble_and_warnings(args: &Config) -> Result<(), Box<dyn Error>> {
|
||||
let build_string = option_env!("VERGEN_GIT_SHA_SHORT")
|
||||
.map(|git_sha| format!(" ({})", git_sha))
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![cfg(not(tarpaulin_include))]
|
||||
|
||||
use std::fs::metadata;
|
||||
use std::hint::unreachable_unchecked;
|
||||
use std::time::SystemTime;
|
||||
|
|
|
@ -162,6 +162,7 @@ impl<'de> Deserialize<'de> for Tls {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
impl std::fmt::Debug for Tls {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("Tls")
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![cfg(not(tarpaulin_include))]
|
||||
|
||||
use reqwest::StatusCode;
|
||||
use serde::Serialize;
|
||||
use tracing::{info, warn};
|
||||
|
|
Loading…
Reference in a new issue