forked from chronotope/chrono
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Utc::now() and dependents without wasmbind
std::time::SystemTime::now() panics in WASM environments other than Emscripten (i.e., wasm32-unknown-emscripten) and WASI (e.g., wasm32-wasi). Since compilation errors are preferable to unexpected runtime panics, this PR removes the `Utc::now()` function from this crate's public interface altogether in unsupported WASM environments unless the `wasmbind` feature is enabled. This catches the case in which a user of the crate forgets to enable the `wasmbind` feature (see ramosbugs/openidconnect-rs#127 and ramosbugs/oauth2-rs#230) in build targets that require it. Fixes chronotope#1301.
- Loading branch information
Showing
2 changed files
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters