Skip to content

Commit

Permalink
style: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Sep 5, 2024
1 parent d7e8600 commit 3638648
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/blockifier/src/execution/entry_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::cmp::min;
use std::sync::Arc;

use cairo_vm::vm::runners::cairo_runner::{ExecutionResources, ResourceTracker, RunResources};
use num_traits::{Inv, Zero};
use num_traits::{Inv, ToPrimitive, Zero};
use serde::Serialize;
use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector};
use starknet_api::deprecated_contract_class::EntryPointType;
Expand Down Expand Up @@ -173,10 +173,10 @@ impl EntryPointExecutionContext {
// TODO(Ori, 1/2/2024): Write an indicative expect message explaining why the conversion
// works.
ExecutionMode::Validate => {
block_context.versioned_constants.validate_max_n_steps as usize
block_context.versioned_constants.validate_max_n_steps.to_usize().unwrap()
}
ExecutionMode::Execute => {
block_context.versioned_constants.invoke_tx_max_n_steps as usize
block_context.versioned_constants.invoke_tx_max_n_steps.to_usize().unwrap()
}
};

Expand Down
1 change: 1 addition & 0 deletions crates/blockifier/src/execution/execution_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ pub struct ReadOnlySegment {
pub struct ReadOnlySegments(Vec<ReadOnlySegment>);

impl ReadOnlySegments {
#[allow(clippy::ptr_arg)]
pub fn allocate(
&mut self,
vm: &mut VirtualMachine,
Expand Down
2 changes: 1 addition & 1 deletion scripts/clippy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

cargo clippy "$@" --all-targets --all-features -- -D warnings -D future-incompatible \
cargo +nightly-2024-01-12 clippy "$@" --all-targets --all-features -- -D warnings -D future-incompatible \
-D nonstandard-style -D rust-2018-idioms -D unused

0 comments on commit 3638648

Please sign in to comment.