Merge pull request #300 from Schmiddiii/decrypt-device-info #229
clippy
8 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 8 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 69 in libsignal-service-actix/src/websocket.rs
github-actions / clippy
bound is defined in more than one place
warning: bound is defined in more than one place
--> libsignal-service-actix/src/websocket.rs:69:18
|
69 | async fn process<S: Stream>(
| ^
...
75 | S: Stream<Item = Result<Frame, WsProtocolError>>,
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
Check warning on line 69 in libsignal-service-actix/src/websocket.rs
github-actions / clippy
bound is defined in more than one place
warning: bound is defined in more than one place
--> libsignal-service-actix/src/websocket.rs:69:18
|
69 | async fn process<S: Stream>(
| ^
...
74 | S: Unpin,
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
= note: `#[warn(clippy::multiple_bound_locations)]` on by default
Check warning on line 107 in libsignal-service/src/configuration.rs
github-actions / clippy
direct implementation of `ToString`
warning: direct implementation of `ToString`
--> libsignal-service/src/configuration.rs:99:1
|
99 | / impl ToString for SignalServers {
100 | | fn to_string(&self) -> String {
101 | | match self {
102 | | Self::Staging => "staging",
... |
106 | | }
107 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `#[warn(clippy::to_string_trait_impl)]` on by default
Check warning on line 185 in libsignal-service/src/cipher.rs
github-actions / clippy
the function `message_decrypt_prekey` doesn't need a mutable reference
warning: the function `message_decrypt_prekey` doesn't need a mutable reference
--> libsignal-service/src/cipher.rs:185:21
|
185 | &mut self.protocol_store.clone(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
= note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
Check warning on line 879 in libsignal-service/src/account_manager.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> libsignal-service/src/account_manager.rs:879:35
|
879 | Ok(crate::decrypt_device_name(&aci.private_key(), &name)?)
| ^^^^^^^^^^^^^^^^^^ help: change this to: `aci.private_key()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 879 in libsignal-service/src/account_manager.rs
github-actions / clippy
question mark operator is useless here
warning: question mark operator is useless here
--> libsignal-service/src/account_manager.rs:879:5
|
879 | Ok(crate::decrypt_device_name(&aci.private_key(), &name)?)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `crate::decrypt_device_name(&aci.private_key(), &name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
= note: `#[warn(clippy::needless_question_mark)]` on by default
Check warning on line 749 in libsignal-service/src/account_manager.rs
github-actions / clippy
called `is_none()` after searching an `Iterator` with `find`
warning: called `is_none()` after searching an `Iterator` with `find`
--> libsignal-service/src/account_manager.rs:746:24
|
746 | if pni_registration_ids
| ________________________^
747 | | .iter()
748 | | .find(|(_k, v)| **v == regid)
749 | | .is_none()
| |__________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
= note: `#[warn(clippy::search_is_some)]` on by default
help: consider using
|
746 ~ if !pni_registration_ids
747 + .iter().any(|(_k, v)| **v == regid)
|
Check warning on line 108 in libsignal-service/src/provisioning/mod.rs
github-actions / clippy
struct `ConfirmDeviceMessage` is never constructed
warning: struct `ConfirmDeviceMessage` is never constructed
--> libsignal-service/src/provisioning/mod.rs:108:19
|
108 | pub(crate) struct ConfirmDeviceMessage {
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default