Skip to content

Commit

Permalink
Fix clippy on generated code & add a deny for warnings (#640)
Browse files Browse the repository at this point in the history
* fix clippy on generated code

* remove random comment

* fix clippy cmd
  • Loading branch information
insipx authored Apr 9, 2024
1 parent 43884ec commit 1a3105b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ENV RUSTUP_PERMIT_COPY_RENAME "yes"

RUN cargo check
RUN cargo fmt --check
RUN cargo clippy --all-features --no-deps
RUN cargo clippy --all-features --no-deps -- -Dwarnings
# some tests are setup as integration tests 👀 xmtp_mls
RUN for crate in xmtp_cryptography xmtp_proto xmtp_v2; do cd ${crate}; cargo test; done

Expand Down
4 changes: 2 additions & 2 deletions xmtp_mls/src/groups/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ where
client: Arc<Client<ApiClient>>,
group_id: Vec<u8>,
created_at_ns: i64,
mut callback: impl FnMut(StoredGroupMessage) + Send + 'static,
callback: impl FnMut(StoredGroupMessage) + Send + 'static,
) -> Result<StreamCloser, GroupError> {
Ok(Client::<ApiClient>::stream_messages_with_callback(
client,
Expand All @@ -86,7 +86,7 @@ where
cursor: 0,
},
)]),
move |message| callback(message),
callback,
)?)
}
}
Expand Down
7 changes: 6 additions & 1 deletion xmtp_proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
include!("gen/mod.rs");
#[allow(clippy::all)]
mod generated {
include!("gen/mod.rs");
}
pub use generated::*;

#[cfg(feature = "xmtp-message_api-v1")]
pub mod api_client;

0 comments on commit 1a3105b

Please sign in to comment.