1
0
mirror of https://github.com/8051Enthusiast/regex2fat synced 2024-12-04 22:19:57 +00:00

Merge pull request #15 from micwoj92/master

Fix clippy warnings
This commit is contained in:
8051Enthusiast 2022-07-20 13:21:04 +02:00 committed by GitHub
commit a3770b033e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ pub fn generate_fat<D: DFA>(state_blocks: &StateFatMap<D>, pad: UFat) -> Result<
fat.extend_from_slice(&FAT32_EOF); fat.extend_from_slice(&FAT32_EOF);
let mut current_cluster: UFat = 2; let mut current_cluster: UFat = 2;
for state in &state_blocks.order_list { 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, Some(x) => x,
None => return Err("Refernce to invalid state") None => return Err("Refernce to invalid state")
}; };

View File

@ -83,7 +83,7 @@ fn regex_to_fat32<D: DFA, W: Write>(
mut vol: W, mut vol: W,
nomatch: bool, nomatch: bool,
) -> Result<(), Box<dyn Error>> { ) -> Result<(), Box<dyn Error>> {
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 // pad until at least 65536 blocks, since otherwise ideologically
// I would have to implement fat12/fat16 // I would have to implement fat12/fat16
// also keep at least one free block for match file (which is 0 bytes, // also keep at least one free block for match file (which is 0 bytes,