Skip to content

Commit 79c2471

Browse files
committed
Fix style
1 parent ff17a41 commit 79c2471

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/binary_heap.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ impl<T, K, const N: usize> BinaryHeap<T, K, N> {
191191
pub fn from_vec(vec: Vec<T, N, usize>) -> Self
192192
where
193193
T: Ord,
194-
K: Kind
194+
K: Kind,
195195
{
196196
let mut heap = Self {
197197
_kind: PhantomData,
198198
data: vec,
199199
};
200200
let len = heap.len();
201-
for i in (0..len/2).rev() {
201+
for i in (0..len / 2).rev() {
202202
heap.sift_down_to_bottom(i, len);
203203
}
204204
heap
@@ -954,7 +954,10 @@ mod tests {
954954
let heap: BinaryHeap<u8, Min, 16> = BinaryHeap::from_vec(src);
955955
assert_eq!(heap.len(), 13);
956956
assert_eq!(heap.capacity(), 16);
957-
assert_eq!(&heap.into_vec(), &[0, 1, 3, 6, 2, 4, 12, 8, 9, 7, 5, 11, 10]);
957+
assert_eq!(
958+
&heap.into_vec(),
959+
&[0, 1, 3, 6, 2, 4, 12, 8, 9, 7, 5, 11, 10]
960+
);
958961
}
959962

960963
#[test]

0 commit comments

Comments
 (0)