@@ -43,7 +43,7 @@ priv impl<T> DListNode<T> {
43
43
pure fn assert_links ( ) {
44
44
match self . next {
45
45
Some ( neighbour) => match neighbour. prev {
46
- Some ( me) => if !box :: ptr_eq ( * self , * me) {
46
+ Some ( me) => if !managed :: ptr_eq ( * self , * me) {
47
47
fail ~"Asymmetric next-link in dlist node. "
48
48
} ,
49
49
None => fail ~"One -way next-link in dlist node. "
@@ -52,7 +52,7 @@ priv impl<T> DListNode<T> {
52
52
}
53
53
match self . prev {
54
54
Some ( neighbour) => match neighbour. next {
55
- Some ( me) => if !box :: ptr_eq ( * me, * self ) {
55
+ Some ( me) => if !managed :: ptr_eq ( * me, * self ) {
56
56
fail ~"Asymmetric prev-link in dlist node. "
57
57
} ,
58
58
None => fail ~"One -way prev-link in dlist node. "
@@ -137,9 +137,11 @@ priv impl<T> DList<T> {
137
137
}
138
138
if !nobe. linked { fail ~"That node isn' t linked to any dlist. " }
139
139
if !( ( nobe. prev . is_some ( )
140
- || box:: ptr_eq ( * self . hd . expect ( ~"headless dlist?") , * nobe) ) &&
140
+ || managed:: ptr_eq ( * self . hd . expect ( ~"headless dlist?") ,
141
+ * nobe) ) &&
141
142
( nobe. next . is_some ( )
142
- || box:: ptr_eq ( * self . tl . expect ( ~"tailless dlist?") , * nobe) ) ) {
143
+ || managed:: ptr_eq ( * self . tl . expect ( ~"tailless dlist?") ,
144
+ * nobe) ) ) {
143
145
fail ~"That node isn' t on this dlist. "
144
146
}
145
147
}
@@ -322,7 +324,7 @@ impl<T> DList<T> {
322
324
* to the other list's head. O(1).
323
325
*/
324
326
fn append ( them : DList < T > ) {
325
- if box :: ptr_eq ( * self , * them) {
327
+ if managed :: ptr_eq ( * self , * them) {
326
328
fail ~"Cannot append a dlist to itself!"
327
329
}
328
330
if them.len() > 0 {
@@ -339,7 +341,7 @@ impl<T> DList<T> {
339
341
* list's tail to this list's head. O(1).
340
342
*/
341
343
fn prepend(them: DList<T>) {
342
- if box ::ptr_eq(*self, *them) {
344
+ if managed ::ptr_eq(*self, *them) {
343
345
fail ~" Cannot prepend a dlist to itself!"
344
346
}
345
347
if them. len ( ) > 0 {
@@ -405,7 +407,7 @@ impl<T> DList<T> {
405
407
rabbit = option:: get ( rabbit) . next ;
406
408
}
407
409
if option:: is_some ( & rabbit) {
408
- assert !box :: ptr_eq ( * option:: get ( rabbit) , * nobe) ;
410
+ assert !managed :: ptr_eq ( * option:: get ( rabbit) , * nobe) ;
409
411
}
410
412
// advance
411
413
link = nobe. next_link ( ) ;
@@ -426,7 +428,7 @@ impl<T> DList<T> {
426
428
rabbit = option:: get ( rabbit) . prev ;
427
429
}
428
430
if option:: is_some ( & rabbit) {
429
- assert !box :: ptr_eq ( * option:: get ( rabbit) , * nobe) ;
431
+ assert !managed :: ptr_eq ( * option:: get ( rabbit) , * nobe) ;
430
432
}
431
433
// advance
432
434
link = nobe. prev_link ( ) ;
0 commit comments