File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1- use crate :: { storage:: StorageItem , Epoch , Index } ;
2- use alloc:: sync:: Arc ;
1+ use crate :: { Epoch , Index } ;
32use core:: {
43 cmp:: Ordering ,
54 fmt:: { self , Debug } ,
@@ -169,16 +168,16 @@ impl<T: Marker> Hash for PointerId<T> {
169168}
170169
171170#[ cfg( feature = "serde" ) ]
172- impl < T : StorageItem > From < & Arc < T > > for PointerId < T :: Marker > {
173- fn from ( arc : & Arc < T > ) -> Self {
171+ impl < T : crate :: storage :: StorageItem > From < & alloc :: sync :: Arc < T > > for PointerId < T :: Marker > {
172+ fn from ( arc : & alloc :: sync :: Arc < T > ) -> Self {
174173 // Since the memory representation of `Arc<T>` is just a pointer to
175174 // `ArcInner<T>`, it would be nice to use that pointer as the trace ID,
176175 // since many `into_trace` implementations would then be no-ops at
177176 // runtime. However, `Arc::as_ptr` returns a pointer to the contained
178177 // data, not to the `ArcInner`. The `ArcInner` stores the reference
179178 // counts before the data, so the machine code for this conversion has
180179 // to add an offset to the pointer.
181- PointerId :: PointerId ( Arc :: as_ptr ( arc) as usize , PhantomData )
180+ PointerId :: PointerId ( alloc :: sync :: Arc :: as_ptr ( arc) as usize , PhantomData )
182181 }
183182}
184183
You can’t perform that action at this time.
0 commit comments