Skip to content

Commit f0f4d2d

Browse files
author
Olivier Saut
committed
Implement the get function on ARC from the method
1 parent efd965c commit f0f4d2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ pub fn ARC<T:Const + Owned>(data: T) -> ARC<T> {
9393
* wrapper.
9494
*/
9595
pub fn get<'a, T:Const + Owned>(rc: &'a ARC<T>) -> &'a T {
96-
unsafe { &*rc.x.get_immut() }
96+
rc.get()
9797
}
9898

99-
impl<T: Const + Owned> ARC<T> {
99+
impl<T:Const+Owned> ARC<T> {
100100
pub fn get<'a>(&'a self) -> &'a T {
101-
get(self)
101+
unsafe { &*self.x.get_immut() }
102102
}
103103
}
104104
/**

0 commit comments

Comments
 (0)