Stream: git-wasmtime

Topic: wasmtime / PR #3472 Remove some uses of `foo.expect(&form...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2021 at 22:55):

fitzgen requested cfallin for a review on PR #3472.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2021 at 22:55):

fitzgen opened PR #3472 from no-expect-format to main:

This eagerly evaluates the format! and produces a String with a heap
allocation, regardless whether foo is Some/Ok or None/Err. Using
foo.unwrap_or_else(|| panic!(...)) makes it so that the error message
formatting is only evaluated if foo is None/Err.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2021 at 23:13):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2021 at 00:35):

fitzgen updated PR #3472 from no-expect-format to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2021 at 02:31):

fitzgen merged PR #3472.


Last updated: Dec 23 2024 at 12:05 UTC