Skip to content

Dead code warning for 'SHARED_CONTEXT_TWO' in payjoin crate #889

@Cyber-Lord

Description

@Cyber-Lord

Is there an existing issue for this?

  • I have searched the existing issues

Are you using payjoin-ffi?

  • Yes I am

If so, which host language?

None

Did you enable any features on the crate?

I have clone rust-payjoin and after running "cargo test" on the latest "master" branch, the compiler emits a "dead_code" warning.

Image

What version of the payjoin crate are you using?

payjoin v0.24.0

Current behavior

There's a warning when "cargo test" command is run. It indicates that there's a code that has not been used. I have tried cleaning it and run the test again and it passed. If no plan for it, I'll comment it out and open a PR

Expected behavior

I expect the test to pass and dead codes handled

Steps to reproduce

You can reproduce by cloning the repo and running "cargo build" and "cargo test"

Relevant log output

warning: static SHARED_CONTEXT_TWO is never used
--> payjoin/src/core/receive/v2/mod.rs:1036:23
|
1036 | pub(crate) static SHARED_CONTEXT_TWO: Lazy = Lazy::new(|| SessionContext {
| ^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions