Skip to content

Commit

Permalink
Replaced vec to slice
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagle941 committed Sep 3, 2024
1 parent 6730792 commit df55eed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/blockifier/src/state/cached_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl<S: StateReader, V: VisitedPcs> State for CachedState<S, V> {
Ok(())
}

fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &Vec<usize>) {
fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &[usize]) {
self.visited_pcs.insert(&class_hash, pcs);
}
}
Expand Down
13 changes: 1 addition & 12 deletions crates/blockifier/src/state/state_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub trait State: StateReader {
/// Marks the given set of PC values as visited for the given class hash.
// TODO(lior): Once we have a BlockResources object, move this logic there. Make sure reverted
// entry points do not affect the final set of PCs.
fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &Vec<usize>);
fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &[usize]);
}

/// A class defining the API for updating a state with transactions writes.
Expand All @@ -119,14 +119,3 @@ pub trait UpdatableState: StateReader {
visited_pcs: &Self::T,
);
}

pub trait UpdatableStatetTest: StateReader {
type T;

fn apply_writes(
&mut self,
writes: &StateMaps,
class_hash_to_class: &ContractClassMapping,
visited_pcs: &Self::T,
);
}

0 comments on commit df55eed

Please sign in to comment.