-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add try_transmute!, try_transmute_{ref,mut}!
TODO: Commit message body TODO: - In `try_transmute!`, should the argument be dropped or forgotten (ie, `mem::forget`) when the transmute fails? We could also return the original value in a `Result::Error`, but that would be inconsistent with `TryFrom`. Then again, `TryFrom` provides a custom error type, so in theory implementers could do that if they wanted to. Most of the types that don't consume Copy types. Makes progress on #5
- Loading branch information
Showing
3 changed files
with
275 additions
and
4 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
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