commit
76fbb5d527
@ -14,6 +14,7 @@
|
||||
//! between tasks.
|
||||
|
||||
use core::atomic;
|
||||
use core::borrow::BorrowFrom;
|
||||
use core::clone::Clone;
|
||||
use core::fmt::{mod, Show};
|
||||
use core::cmp::{Eq, Ord, PartialEq, PartialOrd, Ordering};
|
||||
@ -155,6 +156,12 @@ impl<T> Clone for Arc<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> BorrowFrom<Arc<T>> for T {
|
||||
fn borrow_from(owned: &Arc<T>) -> &T {
|
||||
&**owned
|
||||
}
|
||||
}
|
||||
|
||||
#[experimental = "Deref is experimental."]
|
||||
impl<T> Deref<T> for Arc<T> {
|
||||
#[inline]
|
||||
|
Loading…
Reference in New Issue
Block a user