Skip to content

Commit 03fc8f4

Browse files
silyevsksgued
authored andcommitted
Fix style
1 parent 20fe9f5 commit 03fc8f4

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/binary_heap.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,14 @@ impl<T, K, const N: usize> BinaryHeap<T, K, N> {
199199
pub fn from_vec(vec: Vec<T, N, usize>) -> Self
200200
where
201201
T: Ord,
202-
K: Kind
202+
K: Kind,
203203
{
204204
let mut heap = Self {
205205
_kind: PhantomData,
206206
data: vec,
207207
};
208208
let len = heap.len();
209-
for i in (0..len/2).rev() {
209+
for i in (0..len / 2).rev() {
210210
heap.sift_down_to_bottom(i, len);
211211
}
212212
heap
@@ -980,7 +980,10 @@ mod tests {
980980
let heap: BinaryHeap<u8, Min, 16> = BinaryHeap::from_vec(src);
981981
assert_eq!(heap.len(), 13);
982982
assert_eq!(heap.capacity(), 16);
983-
assert_eq!(&heap.into_vec(), &[0, 1, 3, 6, 2, 4, 12, 8, 9, 7, 5, 11, 10]);
983+
assert_eq!(
984+
&heap.into_vec(),
985+
&[0, 1, 3, 6, 2, 4, 12, 8, 9, 7, 5, 11, 10]
986+
);
984987
}
985988

986989
#[test]

0 commit comments

Comments
 (0)