(i: u32, num_blocks: u32)
| 517 | } |
| 518 | |
| 519 | pub(crate) fn get_flags_for_block(i: u32, num_blocks: u32) -> u32 { |
| 520 | if num_blocks == 1 { |
| 521 | return 0b00001011; |
| 522 | } |
| 523 | if i == 0 { |
| 524 | return 0b00000001; |
| 525 | } |
| 526 | if i == num_blocks - 1 { |
| 527 | return 0b00001010; |
| 528 | } |
| 529 | 0 |
| 530 | } |
| 531 | |
| 532 | #[cfg(test)] |
| 533 | mod tests { |