提交 161d289c 编写于 作者: B Brian Anderson

Long lines

上级 8cbf817c
......@@ -87,7 +87,8 @@ fn replace(&mut self, item: T) -> T {
#[cfg(stage3)]
pure fn to_vec(self) -> ~[T] { let PriorityQueue{data: v} = self; v }
/// Consume the PriorityQueue and return a vector in sorted (ascending) order
/// Consume the PriorityQueue and return a vector in sorted
/// (ascending) order
#[cfg(stage0)]
pure fn to_sorted_vec(self) -> ~[T] { fail }
#[cfg(stage1)]
......@@ -115,11 +116,11 @@ fn replace(&mut self, item: T) -> T {
q
}
// The implementations of siftup and siftdown use unsafe blocks in order to
// move an element out of the vector (leaving behind a junk element), shift
// along the others and move it back into the vector over the junk element.
// This reduces the constant factor compared to using swaps, which involves
// twice as many moves.
// The implementations of siftup and siftdown use unsafe blocks in
// order to move an element out of the vector (leaving behind a
// junk element), shift along the others and move it back into the
// vector over the junk element. This reduces the constant factor
// compared to using swaps, which involves twice as many moves.
priv fn siftup(&mut self, start: uint, pos: uint) unsafe {
let mut pos = pos;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册