Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Mar 28, 2024
1 parent 4285314 commit ef0fecf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/benches/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn main() {
}
}

let mut pairs = map.into_iter().map(|(name, runs)| (name, runs)).collect::<Vec<_>>();
let mut pairs = map.into_iter().collect::<Vec<_>>();
pairs.sort_by_key(|(key, _)| key.clone());

for (name, mut runs) in pairs {
Expand Down
4 changes: 2 additions & 2 deletions crates/dojo-types/src/packing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ mod tests {

#[test]
fn parse_simple_with_invalid_value() {
let data = &vec![FieldElement::default()];
assert!(matches!(super::parse_simple(data), Err(ParseError::InvalidSchema)));
let data = [FieldElement::default()];
assert!(matches!(super::parse_simple(&data), Err(ParseError::InvalidSchema)));
}
}
7 changes: 3 additions & 4 deletions crates/katana/core/src/service/messaging/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,9 @@ impl<EF: ExecutorFactory> MessagingService<EF> {

#[cfg(feature = "starknet-messaging")]
MessengerMode::Starknet(inner) => {
let hashes = inner
.send_messages(&messages)
.await
.map(|hashes| hashes.iter().map(|h| format!("{h:#x}")).collect())?;
let hashes = inner.send_messages(&messages).await.map(|hashes| {
hashes.iter().map(|h| format!("{h:#x}")).collect::<Vec<_>>()
})?;

Check warning on line 145 in crates/katana/core/src/service/messaging/service.rs

View check run for this annotation

Codecov / codecov/patch

crates/katana/core/src/service/messaging/service.rs#L143-L145

Added lines #L143 - L145 were not covered by tests
trace_msg_to_l1_sent(&messages, &hashes);
Ok(Some((block_num, hashes.len())))
}
Expand Down
2 changes: 2 additions & 0 deletions crates/katana/rpc/rpc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::blocks_in_conditions)]

pub mod config;
pub mod dev;
pub mod katana;
Expand Down
1 change: 1 addition & 0 deletions crates/torii/graphql/src/tests/models_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ mod tests {

// End to end test spins up a test sequencer and deploys types-test project, this takes a while
// to run so combine all related tests into one
#[allow(clippy::get_first)]
#[tokio::test(flavor = "multi_thread")]
async fn models_test() -> Result<()> {
let pool = spinup_types_test().await?;
Expand Down

0 comments on commit ef0fecf

Please sign in to comment.