chore: format

This commit is contained in:
askiiart 2024-12-31 10:32:36 -06:00
parent 4e3849a76d
commit d75c103ae7
Signed by untrusted user who does not match committer: askiiart
GPG key ID: EA85979611654C30

View file

@ -1,8 +1,7 @@
#[cfg(test)]
use crate::*;
use std::hash::{BuildHasher, Hasher, RandomState};
#[cfg(test)]
/// Tests what stdout prints
#[test]
fn stdout_content() {
@ -69,7 +68,7 @@ fn test_output_is_sorted_sort_works() {
}
// https://stackoverflow.com/a/78840539/16432246
// with rand::seq::SliceRandom and you can shuffle a Vec, but doing this to avoid introducing a ton of dependencies for one little test
// with rand::seq::SliceRandom you can shuffle a Vec, but doing this to avoid introducing a ton of dependencies for one little test
fn shuffle_vec<T>(vec: &mut [T]) {
let n: usize = vec.len();
for i in 0..(n - 1) {
@ -78,4 +77,4 @@ fn shuffle_vec<T>(vec: &mut [T]) {
let j = (RandomState::new().build_hasher().finish() as usize) % (n - i) + i;
vec.swap(i, j);
}
}
}