Skip to content

Update from latest protos #858

Update from latest protos

Update from latest protos #858

Triggered via push April 4, 2024 20:30
Status Success
Total duration 5m 36s
Artifacts

ci-image.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

13 warnings
writing `&String` instead of `&str` involves a new object where a slice will do: xmtp_id/src/associations/state.rs#L64
warning: writing `&String` instead of `&str` involves a new object where a slice will do --> xmtp_id/src/associations/state.rs:64:49 | 64 | pub fn entities_by_parent(&self, parent_id: &String) -> Vec<Entity> { | ^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default help: change this to | 64 ~ pub fn entities_by_parent(&self, parent_id: &str) -> Vec<Entity> { 65 | self.current_entities 66 | .values() 67 ~ .filter(|e| e.added_by_entity == Some(parent_id.to_owned())) |
you are using an explicit closure for cloning elements: xmtp_id/src/associations/state.rs#L39
warning: you are using an explicit closure for cloning elements --> xmtp_id/src/associations/state.rs:39:9 | 39 | self.current_entities.get(id).map(|e| e.clone()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.current_entities.get(id).cloned()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone = note: `#[warn(clippy::map_clone)]` on by default
this `if` statement can be collapsed: xmtp_id/src/associations/association_log.rs#L114
warning: this `if` statement can be collapsed --> xmtp_id/src/associations/association_log.rs:114:9 | 114 | / if self.new_member_signature.signature_kind() == SignatureKind::LegacyDelegated { 115 | | if existing_state.xid != generate_xid(&existing_member_address, &0) { 116 | | return Err(AssociationError::LegacySignatureReuse); 117 | | } 118 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 114 ~ if self.new_member_signature.signature_kind() == SignatureKind::LegacyDelegated && existing_state.xid != generate_xid(&existing_member_address, &0) { 115 + return Err(AssociationError::LegacySignatureReuse); 116 + } |
redundant closure: xmtp_mls/src/groups/subscriptions.rs#L89
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
unnecessary map of the identity function: xmtp_mls/src/groups/members.rs#L42
warning: unnecessary map of the identity function --> xmtp_mls/src/groups/members.rs:42:22 | 42 | .ok() | ______________________^ 43 | | .map(|basic_credential| (basic_credential))?; | |___________________________________________________________^ help: remove the call to `map` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity = note: `#[warn(clippy::map_identity)]` on by default
returning the result of a `let` binding from a block: xmtp_api_grpc/src/auth_token.rs#L59
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) |
the borrowed expression implements the required traits: xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs#L2424
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
the borrowed expression implements the required traits: xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs#L391
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
the borrowed expression implements the required traits: xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs#L387
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
the borrowed expression implements the required traits: xmtp_proto/src/gen/xmtp.message_contents.serde.rs#L2951
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
the borrowed expression implements the required traits: xmtp_proto/src/gen/xmtp.message_contents.serde.rs#L1334
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
this function has too many arguments (8/7): src/mls.rs#L48
warning: this function has too many arguments (8/7) --> src/mls.rs:48:1 | 48 | / pub async fn create_client( 49 | | logger: Box<dyn FfiLogger>, 50 | | host: String, 51 | | is_secure: bool, ... | 56 | | legacy_signed_private_key_proto: Option<Vec<u8>>, 57 | | ) -> Result<Arc<FfiXmtpClient>, GenericError> { | |_____________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
build
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: docker/build-push-action@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.