Skip to content

Commit

Permalink
fix gas on remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Mododo committed Sep 19, 2023
1 parent 12595f2 commit 255ca50
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/dict/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//! Dictionary implementation.

use crate::cell::*;
use crate::error::Error;

pub use aug::*;
pub use cell_context::*;
pub use raw::*;
pub use typed::*;

use crate::cell::*;
use crate::error::Error;

mod aug;
mod cell_context;
mod raw;
Expand Down Expand Up @@ -155,10 +155,7 @@ pub fn dict_remove_owned<G: CellContext>(

// Load value branch
let value = match last.data.reference_cloned(index) {
Some(child) => {
// leave resulting value as it is
cell_context.load_cell(child, LoadCellMode::USE_GAS)?
}
Some(child) => child,
None => return Err(Error::CellUnderflow.into()),
};

Expand Down

0 comments on commit 255ca50

Please sign in to comment.