Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy issues #1172

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix clippy issues #1172

wants to merge 2 commits into from

Conversation

dangeross
Copy link
Collaborator

Fixes these clippy issues:

error: operator precedence can trip the unwary
   --> sdk-common/src/invoice.rs:100:8
    |
100 |     Ok((block_num & 0xFFFFFF) << 40 | (tx_num & 0xFFFFFF) << 16 | (tx_out & 0xFFFF))
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `((block_num & 0xFFFFFF) << 40) | ((tx_num & 0xFFFFFF) << 16)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
    = note: `-D clippy::precedence` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::precedence)]`
error: useless conversion to the same type: `breez_sdk_core::error::ConnectError`
    --> /home/runner/work/breez-sdk-greenlight/breez-sdk-greenlight/libs/target/debug/build/breez_sdk-1e37e56222681eb0/out/breez_sdk.uniffi.rs:4064:11
     |
4064 |         }).map_err(Into::into).map_err(<FfiConverterTypeConnectError as uniffi::FfiConverter>::lower)?;
     |           ^^^^^^^^^^^^^^^^^^^^ help: consider removing
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
     = note: `-D clippy::useless-conversion` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]`

@dangeross dangeross requested review from roeierez and JssDWt February 20, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants