accidentally committed bug

This commit is contained in:
Fabian Schmidt 2024-08-05 10:54:59 +02:00
parent 13c54a2811
commit 1c066ec113

View File

@ -46,7 +46,8 @@ pub fn run() {
let currposition = *bounds.get(i).unwrap();
let end = *bounds.get(i + 1).unwrap();
s.spawn(move || {
let t_mmap = &mmap[currposition..end];
let file = File::open(FILE_PATH).expect("File measurements.txt not found");
let t_mmap = &unsafe { MmapOptions::new().map(&file).unwrap() }[currposition..end];
let mut t_stations: HashMap<usize, (String, StationMeasurements)> =
HashMap::with_capacity_and_hasher(DEFAULT_HASHMAP_LENGTH, hasher);
for line in t_mmap.lines() {