You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by Sammy <no...@github.com> on 2020/04/04 12:21:47 UTC
[apache/incubator-teaclave-sgx-sdk] refactor(sgx_tunittest): remove
the necessary 'std' import for 'should_panic' macro (#217)
## Problem
The `should_panic!` macro in `sgx_tunittest` uses `std::panic`, which requires us the imports
`std::panic` every time we use `should_panic!`.
A demo project goes as [patch-sgx_tunittest](https://github.com/sammyne/patch-sgx_tunittest).
To verify, just comment out the patch section of Cargo.toml.
The project demonstrates the this inconvenience, and helps to support [this patch](https://github.com/sammyne/incubator-teaclave-sgx-sdk/commit/34a50a6307b2853d907b3a457cf9c961074f98e0#diff-b02276d3fdf8ec232bd27c1b90221758R109).
The patch mainly add the `std::` prefix to the `panic` function in use so as to avoid explicit
import of the `std::panic` every time.
Hope it helps~
You can view, comment on, or merge this pull request online at:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217
-- Commit Summary --
* refactor(sgx_tunittest): remove the necessary 'std' import for 'should_panic' macro
-- File Changes --
M sgx_tunittest/src/lib.rs (63)
-- Patch Links --
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217.patch
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217
Re: [apache/incubator-teaclave-sgx-sdk] refactor(sgx_tunittest):
remove the necessary 'std::panic' import for 'should_panic' macro (#217)
Posted by Yu Ding <no...@github.com>.
Merged #217 into master.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217#event-3206505501
Re: [apache/incubator-teaclave-sgx-sdk] refactor(sgx_tunittest):
remove the necessary 'std::panic' import for 'should_panic' macro (#217)
Posted by Yu Ding <no...@github.com>.
Thanks @sammyne
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217#issuecomment-609939507