From fb8e6d7b41896cc4ae2c0fd37a1c61e2a4b8c1c7 Mon Sep 17 00:00:00 2001 From: Paul Chen Date: Wed, 23 Aug 2023 19:53:51 +0800 Subject: [PATCH] chore: run lint --- packages/bindings/src/mocks/mock_queriers.rs | 5 +++-- packages/bindings/src/posts/mocks.rs | 14 ++++++++------ packages/bindings/src/posts/msg.rs | 12 ++---------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/packages/bindings/src/mocks/mock_queriers.rs b/packages/bindings/src/mocks/mock_queriers.rs index d48d5229..e52cdaf4 100644 --- a/packages/bindings/src/mocks/mock_queriers.rs +++ b/packages/bindings/src/mocks/mock_queriers.rs @@ -101,8 +101,9 @@ fn register_default_mock_queries(querier: &mut MockDesmosQuerier) { { use crate::posts::mocks::MockPostsQueries; use crate::posts::types::{ - QueryPollAnswersRequest, QueryPostAttachmentsRequest, QueryPostRequest, - QuerySectionPostsRequest, QuerySubspacePostsRequest, QueryIncomingPostOwnerTransferRequestsRequest, + QueryIncomingPostOwnerTransferRequestsRequest, QueryPollAnswersRequest, + QueryPostAttachmentsRequest, QueryPostRequest, QuerySectionPostsRequest, + QuerySubspacePostsRequest, }; QuerySubspacePostsRequest::mock_response( diff --git a/packages/bindings/src/posts/mocks.rs b/packages/bindings/src/posts/mocks.rs index cc98edfc..111e5490 100644 --- a/packages/bindings/src/posts/mocks.rs +++ b/packages/bindings/src/posts/mocks.rs @@ -3,9 +3,10 @@ use crate::cosmos_types::Timestamp; use crate::posts::types::AttachmentContent; use crate::posts::types::{ - Attachment, Media, Post, QueryPollAnswersResponse, QueryPostAttachmentsResponse, - QueryPostResponse, QuerySectionPostsResponse, QuerySubspacePostsResponse, ReplySetting, - UserAnswer, QueryIncomingPostOwnerTransferRequestsResponse, PostOwnerTransferRequest, + Attachment, Media, Post, PostOwnerTransferRequest, + QueryIncomingPostOwnerTransferRequestsResponse, QueryPollAnswersResponse, + QueryPostAttachmentsResponse, QueryPostResponse, QuerySectionPostsResponse, + QuerySubspacePostsResponse, ReplySetting, UserAnswer, }; use chrono::DateTime; @@ -142,13 +143,14 @@ impl MockPostsQueries { } /// Function that mocks a [`QueryIncomingPostOwnerTransferRequestsResponse`]. - pub fn get_mocked_incoming_post_transfer_requests_response() -> QueryIncomingPostOwnerTransferRequestsResponse { + pub fn get_mocked_incoming_post_transfer_requests_response( + ) -> QueryIncomingPostOwnerTransferRequestsResponse { QueryIncomingPostOwnerTransferRequestsResponse { - requests: vec![PostOwnerTransferRequest{ + requests: vec![PostOwnerTransferRequest { subspace_id: 1, post_id: 1, sender: "sender".into(), - receiver: "receiver".into() + receiver: "receiver".into(), }], pagination: None, } diff --git a/packages/bindings/src/posts/msg.rs b/packages/bindings/src/posts/msg.rs index bd6a3af2..31319bf0 100644 --- a/packages/bindings/src/posts/msg.rs +++ b/packages/bindings/src/posts/msg.rs @@ -474,11 +474,7 @@ mod tests { #[test] fn test_accept_post_owner_transfer_request() { - let msg = PostsMsg::accept_post_owner_transfer_request( - 1, - 1, - Addr::unchecked("receiver"), - ); + let msg = PostsMsg::accept_post_owner_transfer_request(1, 1, Addr::unchecked("receiver")); let expected = MsgAcceptPostOwnerTransferRequest { subspace_id: 1, @@ -491,11 +487,7 @@ mod tests { #[test] fn test_refuse_post_owner_transfer_request() { - let msg = PostsMsg::refuse_post_owner_transfer_request( - 1, - 1, - Addr::unchecked("receiver"), - ); + let msg = PostsMsg::refuse_post_owner_transfer_request(1, 1, Addr::unchecked("receiver")); let expected = MsgRefusePostOwnerTransferRequest { subspace_id: 1,