Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenfeizhang committed Dec 6, 2023
1 parent 16ef6b1 commit a4a54b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bus-mapping/src/circuit_input_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ impl<'a> CircuitInputBuilder {
)
} else {
let stack_input_num = 1024 - geth_step.op.valid_stack_ptr_range().1 as usize;
(0..stack_input_num).into_iter().map(|i|
(0..stack_input_num).map(|i|
format!("{:?}", geth_step.stack.nth_last(i))
).collect_vec().join(" ")
}
Expand Down
4 changes: 2 additions & 2 deletions bus-mapping/src/circuit_input_builder/input_state_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ impl<'a> CircuitInputStateRef<'a> {
) -> Result<(), Error> {
let call = self.call()?.clone();
let geth_step = steps
.get(0)
.first()
.ok_or(Error::InternalError("invalid index 0"))?;
let is_err = exec_step.error.is_some();
let is_return_revert_succ = (geth_step.op == OpcodeId::REVERT
Expand Down Expand Up @@ -1516,7 +1516,7 @@ impl<'a> CircuitInputStateRef<'a> {

let call = self.call()?;

if matches!(next_step, None) {
if next_step.is_none() {
// enumerating call scope successful cases
// case 1: call with normal halt opcode termination
if matches!(
Expand Down
8 changes: 4 additions & 4 deletions bus-mapping/src/circuit_input_builder/l2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ impl CircuitInputBuilder {
!existed
}),
)
.fold(
Ok(HashMap::new()),
.try_fold(
HashMap::new(),
|m, parsed| -> Result<HashMap<_, _>, Error> {
let mut m = m?;
let (addr, acc) = parsed.map_err(Error::IoError)?;
Expand All @@ -415,8 +415,8 @@ impl CircuitInputBuilder {
!existed
}),
)
.fold(
Ok(HashMap::new()),
.try_fold(
HashMap::new(),
|m, parsed| -> Result<HashMap<(Address, Word), Word>, Error> {
let mut m = m?;
let ((addr, key), val) = parsed.map_err(Error::IoError)?;
Expand Down

0 comments on commit a4a54b1

Please sign in to comment.