Skip to content

Commit b50265d

Browse files
committed
replace deprecated InterpreterResult usages
1 parent d1d7cb6 commit b50265d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clarity/src/vm/costs/analysis.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::vm::contexts::Environment;
1010
use crate::vm::costs::cost_functions::{linear, CostValues};
1111
use crate::vm::costs::costs_3::Costs3;
1212
use crate::vm::costs::ExecutionCost;
13-
use crate::vm::errors::InterpreterResult;
13+
use crate::vm::errors::VmExecutionError;
1414
use crate::vm::functions::NativeFunctions;
1515
use crate::vm::representations::{ClarityName, SymbolicExpression, SymbolicExpressionType};
1616
use crate::vm::types::QualifiedContractIdentifier;
@@ -1084,7 +1084,7 @@ fn calculate_function_cost_from_native_function(
10841084
fn get_cost_function_for_native(
10851085
function: NativeFunctions,
10861086
_clarity_version: &ClarityVersion,
1087-
) -> Option<fn(u64) -> InterpreterResult<ExecutionCost>> {
1087+
) -> Option<fn(u64) -> Result<ExecutionCost, VmExecutionError>> {
10881088
use crate::vm::functions::NativeFunctions::*;
10891089

10901090
// Map NativeFunctions enum variants to their cost functions
@@ -1286,7 +1286,7 @@ impl From<SummingExecutionCost> for StaticCost {
12861286
/// Helper: calculate min & max costs for a given cost function
12871287
/// This is likely tooo simplistic but for now it'll do
12881288
fn get_costs(
1289-
cost_fn: fn(u64) -> InterpreterResult<ExecutionCost>,
1289+
cost_fn: fn(u64) -> Result<ExecutionCost, VmExecutionError>,
12901290
arg_count: u64,
12911291
) -> Result<ExecutionCost, String> {
12921292
let cost = cost_fn(arg_count).map_err(|e| format!("Cost calculation error: {:?}", e))?;

0 commit comments

Comments
 (0)