Skip to content

Commit 7fa5b6d

Browse files
authored
Merge pull request #6166 from csgui/wasm-issue-653/propagation-error
Propagate error
2 parents cf98bf2 + 8f0ff0f commit 7fa5b6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clarity/src/vm/contexts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ impl<'a, 'b> Environment<'a, 'b> {
13431343
) -> Result<()> {
13441344
use super::database::MemoryBackingStore;
13451345

1346-
let clarity_version = self.contract_context.clarity_version.clone();
1346+
let clarity_version = self.contract_context.clarity_version;
13471347

13481348
let mut contract_ast = ast::build_ast_with_rules(
13491349
&contract_identifier,
@@ -1357,15 +1357,15 @@ impl<'a, 'b> Environment<'a, 'b> {
13571357
let mut store = MemoryBackingStore::new();
13581358
let contract_analysis = analysis::run_analysis(
13591359
&contract_identifier,
1360-
&mut contract_ast.expressions,
1360+
&contract_ast.expressions,
13611361
&mut store.as_analysis_db(),
13621362
false,
13631363
LimitedCostTracker::Free,
13641364
self.global_context.epoch_id,
13651365
clarity_version,
13661366
true,
13671367
)
1368-
.unwrap();
1368+
.map_err(|(check_error, _)| check_error.err)?;
13691369

13701370
self.initialize_contract_from_ast(
13711371
contract_identifier,

0 commit comments

Comments
 (0)