remove uuid

This commit is contained in:
Simon Gardling
2022-05-24 13:09:00 -04:00
parent e346b0a2e3
commit a60f1cb83d
4 changed files with 15 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
use std::{intrinsics::assume, ops::RangeInclusive};
use egui::plot::{Line, Points, Value, Values};
use getrandom::getrandom;
use itertools::Itertools;
/// [`SteppedVector`] is used in order to efficiently sort through an ordered
@@ -286,3 +287,9 @@ pub const fn hashed_storage_read(data: &str) -> Option<(HashBytes, &[u8])> {
&decoded_1[HASH_LENGTH..],
))
}
pub fn random_u64() -> u64 {
let mut data: [u8; 8] = [0, 0, 0, 0, 0, 0, 0, 0];
getrandom(&mut data).expect("unable to generate random number");
u64::from_be_bytes(data)
}