Skip to content
GitHub Actions / workspace failed Mar 28, 2024 in 0s

workspace

7 errors, 12 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 7
Warning 12
Note 0
Help 0

Versions

  • rustc 1.77.1 (7cf61ebde 2024-03-27)
  • cargo 1.77.1 (e52e36006 2024-03-26)
  • clippy 0.1.77 (7cf61eb 2024-03-27)

Annotations

Check failure on line 73 in xmtp_id/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

the `?` operator can only be applied to values that implement `std::ops::Try`

error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
  --> xmtp_id/src/lib.rs:73:26
   |
73 |         let credential = CredentialVerifier::verify_credential(request)?;
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `std::pin::Pin<std::boxed::Box<dyn futures::Future<Output = std::result::Result<credential::VerifiedCredential, credential::VerificationError>> + std::marker::Send>>`
   |
   = help: the trait `std::ops::Try` is not implemented for `Pin<Box<dyn Future<Output = Result<VerifiedCredential, VerificationError>> + Send>>`

Check failure on line 72 in xmtp_id/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

arguments to this function are incorrect

error[E0308]: arguments to this function are incorrect
  --> xmtp_id/src/lib.rs:72:23
   |
72 |         let request = VerificationRequest::new(credential, installation_public_key);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: expected `Vec<u8>`, found `&[u8]`
  --> xmtp_id/src/lib.rs:72:48
   |
72 |         let request = VerificationRequest::new(credential, installation_public_key);
   |                                                ^^^^^^^^^^
   = note: expected struct `std::vec::Vec<u8>`
           found reference `&[u8]`
note: expected `Vec<u8>`, found `&[u8]`
  --> xmtp_id/src/lib.rs:72:60
   |
72 |         let request = VerificationRequest::new(credential, installation_public_key);
   |                                                            ^^^^^^^^^^^^^^^^^^^^^^^
   = note: expected struct `std::vec::Vec<u8>`
           found reference `&[u8]`
note: associated function defined here
  --> xmtp_id/src/credential.rs:48:12
   |
48 |     pub fn new(installation_public_key: Vec<u8>, credential: Vec<u8>) -> Self {
   |            ^^^ --------------------------------  -------------------
help: try using a conversion method
   |
72 |         let request = VerificationRequest::new(credential.to_vec(), installation_public_key);
   |                                                          +++++++++
help: try using a conversion method
   |
72 |         let request = VerificationRequest::new(credential, installation_public_key.to_vec());
   |                                                                                   +++++++++

Check failure on line 84 in xmtp_id/src/credential.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

mismatched types

error[E0308]: mismatched types
  --> xmtp_id/src/credential.rs:84:13
   |
79 |         Ok(match credential {
   |                  ---------- this expression has type `std::result::Result<xmtp_mls::credential::Credential, xmtp_mls::credential::AssociationError>`
...
84 |             Credential::LegacyCreateIdentity(cred) => VerifiedCredential {
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<Credential, ...>`, found `Credential`
   |
   = note: expected enum `std::result::Result<xmtp_mls::credential::Credential, xmtp_mls::credential::AssociationError>`
              found enum `xmtp_mls::credential::Credential`
help: try wrapping the pattern in `Ok`
   |
84 |             Ok(Credential::LegacyCreateIdentity(cred)) => VerifiedCredential {
   |             +++                                      +

Check failure on line 80 in xmtp_id/src/credential.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

mismatched types

error[E0308]: mismatched types
  --> xmtp_id/src/credential.rs:80:13
   |
79 |         Ok(match credential {
   |                  ---------- this expression has type `std::result::Result<xmtp_mls::credential::Credential, xmtp_mls::credential::AssociationError>`
80 |             Credential::GrantMessagingAccess(cred) => VerifiedCredential {
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<Credential, ...>`, found `Credential`
   |
   = note: expected enum `std::result::Result<xmtp_mls::credential::Credential, xmtp_mls::credential::AssociationError>`
              found enum `xmtp_mls::credential::Credential`
help: try wrapping the pattern in `Ok`
   |
80 |             Ok(Credential::GrantMessagingAccess(cred)) => VerifiedCredential {
   |             +++                                      +

Check failure on line 78 in xmtp_id/src/credential.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

mismatched types

error[E0308]: mismatched types
  --> xmtp_id/src/credential.rs:78:46
   |
78 |             Credential::from_proto_validated(proto, None, Some(request.installation_public_key));
   |             -------------------------------- ^^^^^ expected `MlsCredential`, found `Result<MlsCredential, DecodeError>`
   |             |
   |             arguments to this function are incorrect
   |
   = note: expected struct `xmtp_proto::xmtp::mls::message_contents::MlsCredential`
                found enum `std::result::Result<xmtp_proto::xmtp::mls::message_contents::MlsCredential, prost::DecodeError>`
note: associated function defined here
  --> /home/runner/work/libxmtp/libxmtp/xmtp_mls/src/credential/mod.rs:92:12
   |
92 |     pub fn from_proto_validated(
   |            ^^^^^^^^^^^^^^^^^^^^
help: consider using `Result::expect` to unwrap the `std::result::Result<xmtp_proto::xmtp::mls::message_contents::MlsCredential, prost::DecodeError>` value, panicking if the value is a `Result::Err`
   |
78 |             Credential::from_proto_validated(proto.expect("REASON"), None, Some(request.installation_public_key));
   |                                                   +++++++++++++++++

Check failure on line 78 in xmtp_id/src/credential.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

mismatched types

error[E0308]: mismatched types
  --> xmtp_id/src/credential.rs:78:64
   |
78 |             Credential::from_proto_validated(proto, None, Some(request.installation_public_key));
   |                                                           ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[u8]`, found `Vec<u8>`
   |                                                           |
   |                                                           arguments to this enum variant are incorrect
   |
   = note: expected reference `&[u8]`
                 found struct `std::vec::Vec<u8>`
help: the type constructed contains `std::vec::Vec<u8>` due to the type of the argument passed
  --> xmtp_id/src/credential.rs:78:59
   |
78 |             Credential::from_proto_validated(proto, None, Some(request.installation_public_key));
   |                                                           ^^^^^-------------------------------^
   |                                                                |
   |                                                                this argument influences the type of `Some`
note: tuple variant defined here
  --> /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/option.rs:578:5
help: consider borrowing here
   |
78 |             Credential::from_proto_validated(proto, None, Some(&request.installation_public_key));
   |                                                                +

Check failure on line 76 in xmtp_id/src/credential.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

the trait bound `std::vec::Vec<u8>: prost::bytes::Buf` is not satisfied

error[E0277]: the trait bound `std::vec::Vec<u8>: prost::bytes::Buf` is not satisfied
   --> xmtp_id/src/credential.rs:76:45
    |
76  |         let proto = CredentialProto::decode(request.credential);
    |                     ----------------------- ^^^^^^^^^^^^^^^^^^ the trait `prost::bytes::Buf` is not implemented for `std::vec::Vec<u8>`
    |                     |
    |                     required by a bound introduced by this call
    |
    = help: the following other types implement trait `prost::bytes::Buf`:
              std::boxed::Box<T>
              prost::bytes::Bytes
              prost::bytes::BytesMut
              tungstenite::buffer::ReadBuffer<CHUNK_SIZE>
              prost::bytes::buf::Chain<T, U>
              prost::bytes::buf::Take<T>
              tonic::codec::buffer::DecodeBuf<'_>
              std::collections::VecDeque<u8>
            and 3 others
note: required by a bound in `prost::Message::decode`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-0.12.3/src/message.rs:112:12
    |
110 |     fn decode<B>(mut buf: B) -> Result<Self, DecodeError>
    |        ------ required by a bound in this associated function
111 |     where
112 |         B: Buf,
    |            ^^^ required by this bound in `Message::decode`

Check warning on line 17 in xmtp_id/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

unused import: `VerifiedCredential`

warning: unused import: `VerifiedCredential`
  --> xmtp_id/src/lib.rs:17:59
   |
17 |     credential::{CredentialVerifier, VerificationRequest, VerifiedCredential},
   |                                                           ^^^^^^^^^^^^^^^^^^

Check warning on line 14 in xmtp_id/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

unused import: `xmtp_proto::xmtp::mls::message_contents::MlsCredential as CredentialProto`

warning: unused import: `xmtp_proto::xmtp::mls::message_contents::MlsCredential as CredentialProto`
  --> xmtp_id/src/lib.rs:14:5
   |
14 | use xmtp_proto::xmtp::mls::message_contents::MlsCredential as CredentialProto;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 11 in xmtp_id/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

unused import: `credential::Credential`

warning: unused import: `credential::Credential`
  --> xmtp_id/src/lib.rs:11:33
   |
11 |     configuration::CIPHERSUITE, credential::Credential,
   |                                 ^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 9 in xmtp_id/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

unused import: `prost::Message`

warning: unused import: `prost::Message`
 --> xmtp_id/src/lib.rs:9:5
  |
9 | use prost::Message;
  |     ^^^^^^^^^^^^^^

Check warning on line 3 in xmtp_id/src/credential.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

unused imports: `GrantMessagingAccessAssociation`, `LegacyCreateIdentityAssociation`

warning: unused imports: `GrantMessagingAccessAssociation`, `LegacyCreateIdentityAssociation`
 --> xmtp_id/src/credential.rs:3:30
  |
3 |     credential::{Credential, GrantMessagingAccessAssociation, LegacyCreateIdentityAssociation},
  |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 89 in xmtp_mls/src/groups/subscriptions.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

redundant closure

warning: redundant closure
  --> xmtp_mls/src/groups/subscriptions.rs:89:13
   |
89 |             move |message| callback(message),
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `callback`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
   = note: `#[warn(clippy::redundant_closure)]` on by default

Check warning on line 59 in xmtp_api_grpc/src/auth_token.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
  --> xmtp_api_grpc/src/auth_token.rs:59:9
   |
58 |         let token_base64 = base64::engine::general_purpose::STANDARD.encode(&token_bytes);
   |         ---------------------------------------------------------------------------------- unnecessary `let` binding
59 |         token_base64
   |         ^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
   = note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
   |
58 ~         
59 ~         base64::engine::general_purpose::STANDARD.encode(&token_bytes)
   |

Check warning on line 2424 in xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
    --> xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs:2424:91
     |
2424 |                     struct_ser.serialize_field("content", pbjson::private::base64::encode(&v).as_str())?;
     |                                                                                           ^^ help: change this to: `v`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 391 in xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs:391:115
    |
391 |                     struct_ser.serialize_field("unsignedLegacyCreateIdentityKey", pbjson::private::base64::encode(&v).as_str())?;
    |                                                                                                                   ^^ help: change this to: `v`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 387 in xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs:387:99
    |
387 |                     struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&v).as_str())?;
    |                                                                                                   ^^ help: change this to: `v`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 2951 in xmtp_proto/src/gen/xmtp.message_contents.serde.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
    --> xmtp_proto/src/gen/xmtp.message_contents.serde.rs:2951:86
     |
2951 |             struct_ser.serialize_field("senderHmac", pbjson::private::base64::encode(&v).as_str())?;
     |                                                                                      ^^ help: change this to: `v`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 1334 in xmtp_proto/src/gen/xmtp.message_contents.serde.rs

See this annotation in the file changed.

@github-actions github-actions / workspace

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
    --> xmtp_proto/src/gen/xmtp.message_contents.serde.rs:1334:86
     |
1334 |                     struct_ser.serialize_field("v1", pbjson::private::base64::encode(&v).as_str())?;
     |                                                                                      ^^ help: change this to: `v`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
     = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default