diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2014-04-05 20:38:35 +0200 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2014-04-05 20:38:35 +0200 |
| commit | dbeea147ad1ec73590fdeafada895d0de2ad4278 (patch) | |
| tree | 50392c299f80924ad5bcdb8d16e17184a408bd1e | |
| parent | 94a055c7295bd5822219b86243c2af6fff9d21d3 (diff) | |
| download | rust-dbeea147ad1ec73590fdeafada895d0de2ad4278.tar.gz rust-dbeea147ad1ec73590fdeafada895d0de2ad4278.zip | |
Fix an unnecessary use of `cast::transmute`
Wherever possible, more specialized variants of said functions should be used, such as in this case `cast::transmute_mmut_unsafe`.
| -rw-r--r-- | src/libstd/ty.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/ty.rs b/src/libstd/ty.rs index dc4e55deb4b..0c9f0b02fdf 100644 --- a/src/libstd/ty.rs +++ b/src/libstd/ty.rs @@ -63,7 +63,7 @@ impl<T> Unsafe<T> { /// Gets a mutable pointer to the wrapped value #[inline] - pub unsafe fn get(&self) -> *mut T { cast::transmute(&self.value) } + pub unsafe fn get(&self) -> *mut T { cast::transmute_mut_unsafe(&self.value) } /// Unwraps the value #[inline] |
