File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ impl <T: Ord> PriorityQueue<T> {
87
87
#[ cfg( stage3) ]
88
88
pure fn to_vec ( self ) -> ~[ T ] { let PriorityQueue { data : v} = self ; v }
89
89
90
- /// Consume the PriorityQueue and return a vector in sorted (ascending) order
90
+ /// Consume the PriorityQueue and return a vector in sorted
91
+ /// (ascending) order
91
92
#[ cfg( stage0) ]
92
93
pure fn to_sorted_vec ( self ) -> ~[ T ] { fail }
93
94
#[ cfg( stage1) ]
@@ -115,11 +116,11 @@ impl <T: Ord> PriorityQueue<T> {
115
116
q
116
117
}
117
118
118
- // The implementations of siftup and siftdown use unsafe blocks in order to
119
- // move an element out of the vector (leaving behind a junk element), shift
120
- // along the others and move it back into the vector over the junk element.
121
- // This reduces the constant factor compared to using swaps, which involves
122
- // twice as many moves.
119
+ // The implementations of siftup and siftdown use unsafe blocks in
120
+ // order to move an element out of the vector (leaving behind a
121
+ // junk element), shift along the others and move it back into the
122
+ // vector over the junk element. This reduces the constant factor
123
+ // compared to using swaps, which involves twice as many moves.
123
124
124
125
priv fn siftup ( & mut self , start : uint , pos : uint ) unsafe {
125
126
let mut pos = pos;
You can’t perform that action at this time.
0 commit comments