Shortened a function a bit, would love to continue but I've got so much

homework
This commit is contained in:
2025-11-30 12:14:31 +00:00
parent ee8e97ddb0
commit 54ec8c22d5
2 changed files with 63 additions and 58 deletions

View File

@@ -33,7 +33,7 @@ pub fn get_page(bytes: &[u8], page: &str) -> Vec<u8>
if let Some(opening_index) = find_pattern(bytes, &search_pages_bytes)
&& let Some(closing_index) = find_closing_brace(bytes, opening_index+search_pages_bytes.len())
{
{ // TODO ignore when in quotes or name
//println!("found pages: {} to {}", opening_index, closing_index);
if let Some(opening_page_index) = find_pattern(&bytes[opening_index..=closing_index], &search_bytes)
{