Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,7 @@ jobs:
uses: eclipse-uprotocol/ci-cd/.github/workflows/rust-verify-latest-deps.yaml@main

deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: EmbarkStudios/cargo-deny-action@v2
with:
rust-version: ${{ env.RUST_TOOLCHAIN }}
command: check
arguments: --all-features
uses: eclipse-uprotocol/ci-cd/.github/workflows/rust-deny-check.yaml@main

# [impl->req~up-language-ci-test~1]
test-all-features:
Expand Down
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,8 @@ required-features = ["communication", "util"]
[[example]]
name = "simple_rpc"
required-features = ["communication", "util"]

[lints.rust]
# this prevents cargo from complaining about code blocks
# excluded from tarpaulin coverage checks
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
1 change: 1 addition & 0 deletions src/communication/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub enum NotificationError {
NotifyError(UStatus),
}

#[cfg(not(tarpaulin_include))]
impl Display for NotificationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Expand Down
1 change: 1 addition & 0 deletions src/communication/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub enum PubSubError {
PublishError(UStatus),
}

#[cfg(not(tarpaulin_include))]
impl Display for PubSubError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Expand Down
2 changes: 2 additions & 0 deletions src/communication/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ pub trait RpcServer {
) -> Result<(), RegistrationError>;
}

#[cfg(not(tarpaulin_include))]
#[cfg(any(test, feature = "test-util"))]
mockall::mock! {
/// This extra struct is necessary in order to comply with mockall's requirements regarding the parameter lifetimes
Expand All @@ -301,6 +302,7 @@ mockall::mock! {
}
}

#[cfg(not(tarpaulin_include))]
#[cfg(any(test, feature = "test-util"))]
#[async_trait]
/// This delegates the invocation of the UTransport functions to the mocked functions of the Transport struct.
Expand Down
2 changes: 2 additions & 0 deletions src/utransport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ pub trait UTransport: Send + Sync {
}
}

#[cfg(not(tarpaulin_include))]
#[cfg(any(test, feature = "test-util"))]
mockall::mock! {
/// This extra struct is necessary in order to comply with mockall's requirements regarding the parameter lifetimes
Expand All @@ -282,6 +283,7 @@ mockall::mock! {
}
}

#[cfg(not(tarpaulin_include))]
#[cfg(any(test, feature = "test-util"))]
#[async_trait]
/// This delegates the invocation of the UTransport functions to the mocked functions of the Transport struct.
Expand Down
Loading