Skip to content

fix: replace unwrap with expect with meaningful messages#80

Open
Deepak8858 wants to merge 1 commit into
DouglasDwyer:masterfrom
Deepak8858:fix/issue-78-unwrap-to-expect
Open

fix: replace unwrap with expect with meaningful messages#80
Deepak8858 wants to merge 1 commit into
DouglasDwyer:masterfrom
Deepak8858:fix/issue-78-unwrap-to-expect

Conversation

@Deepak8858
Copy link
Copy Markdown

Replaced many instances of .unwrap() with .expect() with meaningful error messages to improve error reporting and debugging, as suggested in #78.

Changes focus on the backend implementations where error context is most valuable.

Closes #78

@juntyr
Copy link
Copy Markdown
Collaborator

juntyr commented Mar 25, 2026

Thank you for picking up the issue @Deepak8858! Would you be able to make the expect messages a bit more specific (i.e. what JS operation failed [e.g. failed to set an import entry] and what type conversion failed [e.g. failed to convert wasmtime::MemoryType to wasm_runtime_layer::MemoryType])?

@DouglasDwyer
Copy link
Copy Markdown
Owner

Would it be possible to enable the clippy::unwrap_used lint with these changes, too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace unwrap with expect

4 participants