Skip to content

Commit

Permalink
oops format
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Nelson committed Dec 17, 2024
1 parent c248d38 commit f9900d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions native/wasmex/src/wit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ use wit_parser::{Resolve, WorldItem};
#[rustler::nif(name = "wit_exported_functions")]
pub fn exported_functions(env: rustler::Env, path: String, wit: String) -> NifResult<Term> {
let mut resolve = Resolve::new();
let id = resolve.push_str(path, &wit)
let id = resolve
.push_str(path, &wit)
.map_err(|e| rustler::Error::Term(Box::new(format!("Failed to parse WIT: {}", e))))?;
let world_id = resolve.select_world(id, None)
let world_id = resolve
.select_world(id, None)
.map_err(|e| rustler::Error::Term(Box::new(format!("Failed to select world: {}", e))))?;
let exports = &resolve.worlds[world_id].exports;
let exported_functions = exports
Expand Down

0 comments on commit f9900d0

Please sign in to comment.