diff --git a/src/fat32.rs b/src/fat32.rs index 86f8b0e..69f910c 100644 --- a/src/fat32.rs +++ b/src/fat32.rs @@ -105,7 +105,7 @@ pub fn generate_fat(state_blocks: &StateFatMap, pad: UFat) -> Result< fat.extend_from_slice(&FAT32_EOF); let mut current_cluster: UFat = 2; for state in &state_blocks.order_list { - let pl = match state_blocks.pos_hash.get(&state) { + let pl = match state_blocks.pos_hash.get(state) { Some(x) => x, None => return Err("Refernce to invalid state") }; diff --git a/src/main.rs b/src/main.rs index 30dc611..b699957 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,7 +83,7 @@ fn regex_to_fat32( mut vol: W, nomatch: bool, ) -> Result<(), Box> { - let state_blocks = determine_state_positions(&dfa, &validlist, nomatch)?; + let state_blocks = determine_state_positions(&dfa, validlist, nomatch)?; // pad until at least 65536 blocks, since otherwise ideologically // I would have to implement fat12/fat16 // also keep at least one free block for match file (which is 0 bytes,