Skip to content

Commit df55eed

Browse files
committed
Replaced vec to slice
1 parent 6730792 commit df55eed

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

crates/blockifier/src/state/cached_state.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl<S: StateReader, V: VisitedPcs> State for CachedState<S, V> {
278278
Ok(())
279279
}
280280

281-
fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &Vec<usize>) {
281+
fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &[usize]) {
282282
self.visited_pcs.insert(&class_hash, pcs);
283283
}
284284
}

crates/blockifier/src/state/state_api.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub trait State: StateReader {
105105
/// Marks the given set of PC values as visited for the given class hash.
106106
// TODO(lior): Once we have a BlockResources object, move this logic there. Make sure reverted
107107
// entry points do not affect the final set of PCs.
108-
fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &Vec<usize>);
108+
fn add_visited_pcs(&mut self, class_hash: ClassHash, pcs: &[usize]);
109109
}
110110

111111
/// A class defining the API for updating a state with transactions writes.
@@ -119,14 +119,3 @@ pub trait UpdatableState: StateReader {
119119
visited_pcs: &Self::T,
120120
);
121121
}
122-
123-
pub trait UpdatableStatetTest: StateReader {
124-
type T;
125-
126-
fn apply_writes(
127-
&mut self,
128-
writes: &StateMaps,
129-
class_hash_to_class: &ContractClassMapping,
130-
visited_pcs: &Self::T,
131-
);
132-
}

0 commit comments

Comments
 (0)