mirror of
https://github.com/facebookexperimental/reverie.git
synced 2025-01-23 05:06:23 +00:00
Remove Addr::as_ref and AddrMut::as_ref
Summary: These operations are misleading and should never be called. Since the address could be a remote address, dereferencing it like this is wildly wrong. Not quite sure how they got there in the first place. Reviewed By: igorsugak Differential Revision: D41193389 fbshipit-source-id: 143c491df81125b319f7d5d88049021a81981795
This commit is contained in:
parent
84da445a0d
commit
df05ba9e83
1 changed files with 0 additions and 12 deletions
|
@ -135,12 +135,6 @@ impl<'a, T> From<&'a T> for Addr<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> AsRef<T> for Addr<'a, T> {
|
||||
fn as_ref(&self) -> &T {
|
||||
unsafe { self.inner.as_ref() }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> fmt::Debug for Addr<'a, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Pointer::fmt(&self.inner, f)
|
||||
|
@ -272,12 +266,6 @@ impl<'a, T> From<&'a T> for AddrMut<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> AsRef<T> for AddrMut<'a, T> {
|
||||
fn as_ref(&self) -> &T {
|
||||
unsafe { self.inner.as_ref() }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> fmt::Debug for AddrMut<'a, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Pointer::fmt(&self.inner, f)
|
||||
|
|
Loading…
Reference in a new issue