Skip to content

Implement PNI

Implement PNI #832

GitHub Actions / clippy failed Jan 30, 2024 in 0s

clippy

1 error

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 0
Note 0
Help 0

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check failure on line 686 in libsignal-service/src/account_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
   --> libsignal-service/src/account_manager.rs:686:52
    |
686 |                 .insert(local_device_id_s.clone(), last_resort_kyber_prekey);
    |                  ------                            ^^^^^^^^^^^^^^^^^^^^^^^^ expected `KyberPreKeyEntity`, found `Option<KyberPreKeyEntity>`
    |                  |
    |                  arguments to this method are incorrect
    |
    = note: expected struct `pre_keys::KyberPreKeyEntity`
                 found enum `std::option::Option<pre_keys::KyberPreKeyEntity>`
help: the return type of this call is `std::option::Option<pre_keys::KyberPreKeyEntity>` due to the type of the argument passed
   --> libsignal-service/src/account_manager.rs:685:13
    |
685 | /             device_pni_last_resort_kyber_prekeys
686 | |                 .insert(local_device_id_s.clone(), last_resort_kyber_prekey);
    | |____________________________________________________------------------------^
    |                                                      |
    |                                                      this argument influences the return type of `insert`
note: method defined here
   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/collections/hash/map.rs:1104:12
help: consider using `Option::expect` to unwrap the `std::option::Option<pre_keys::KyberPreKeyEntity>` value, panicking if the value is an `Option::None`
    |
686 |                 .insert(local_device_id_s.clone(), last_resort_kyber_prekey.expect("REASON"));
    |                                                                            +++++++++++++++++